lib: [ismounted] don't wast time with mtab is /proc/mounts used
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
b79bd89b05
commit
8c9e72ce2b
|
@ -171,6 +171,10 @@ static int check_mntent(const char *file, int *mount_flags,
|
|||
mtpt, mtlen);
|
||||
if (retval == 0 && (*mount_flags != 0))
|
||||
return 0;
|
||||
if (access("/proc/mounts", R_OK) == 0) {
|
||||
*mount_flags = 0;
|
||||
return retval;
|
||||
}
|
||||
#endif /* __linux__ */
|
||||
#if defined(MOUNTED) || defined(_PATH_MOUNTED)
|
||||
#ifndef MOUNTED
|
||||
|
|
Loading…
Reference in New Issue