Whamcloud - gitweb
libext2fs: Skip relative pathnames in /etc/mtab in ismounted.c
The functions which test to see if a device is mounted can get
confused by entries in /etc/mtab for virtual filesystems:
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
If the device name doesn't start with a slash, ignore the /etc/mtab
entry, so that relative pathnames passed into functions such as
ext2fs_check_mount_point() or ext2fs_check_if_mounted() don't return
false positives.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>