Used /proc/mounts for checking existing mounts
The file /etc/mtab is traditionally checked to avoid multiple mountings of the same device, but this is not accurate enough in some conditions. So use /proc/mounts when available and fall back to /etc/mtab on systems which do not have /proc/mounts.edge.strict_endians
parent
b35a204d01
commit
20801dc6a0
|
@ -1433,7 +1433,8 @@ static int ntfs_mntent_check(const char *file, unsigned long *mnt_flags)
|
|||
err = errno;
|
||||
goto exit;
|
||||
}
|
||||
if (!(f = setmntent(MOUNTED, "r"))) {
|
||||
f = setmntent("/proc/mounts", "r");
|
||||
if (!f && !(f = setmntent(MOUNTED, "r"))) {
|
||||
err = errno;
|
||||
goto exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue