diff options
| author | Karel Zak <kzak@redhat.com> | 2010-11-18 21:03:02 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2010-11-24 17:08:26 +0100 |
| commit | 8c9e72ce2b3dc8cbc9df446b8915ea936cb702b3 (patch) | |
| tree | 97e4f1dcd6ac96e6aebebfb1df7eb526d3c3bd2b /lib | |
| parent | b79bd89b05ca3472b11394278b5af716f9914772 (diff) | |
| download | util-linux-old-8c9e72ce2b3dc8cbc9df446b8915ea936cb702b3.tar.gz | |
lib: [ismounted] don't wast time with mtab is /proc/mounts used
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ismounted.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ismounted.c b/lib/ismounted.c index 592df308..f19d67b1 100644 --- a/lib/ismounted.c +++ b/lib/ismounted.c @@ -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 |
