mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-18 06:21:56 +08:00
032eafee30
Device nodes are commonly accessed via symlinks, i.e. lrwxrwxrwx. 1 root root 7 Jul 19 13:01 /dev/mapper/testvg-testlv -> ../dm-0 Today, e4defrag on such a device will fail: File is not regular file "/dev/mapper/testvg-testlv" due to it being a link, and e4defrag on the link target does as well: Filesystem is not mounted due to the target not being found in /etc/mtab. Fix this by checking whether the symlink target is a block device and if so, using that device in main(), and also changing get_mount_point() to search for a matching device number, not device name. Addresses-Red-Hat-Bugzilla: #707209 Reported-by: Peter Hjalmarsson <xake@rymdraket.net> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
72 KiB
72 KiB