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:
Karel Zak 2010-11-18 21:03:02 +01:00
parent b79bd89b05
commit 8c9e72ce2b
1 changed files with 4 additions and 0 deletions

View File

@ -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