aboutsummaryrefslogtreecommitdiff
path: root/src/rc/mountinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/mountinfo.c')
-rw-r--r--src/rc/mountinfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 10e3238d..29eb1600 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -297,6 +297,9 @@ getmntfile(const char *file)
struct mntent *ent = NULL;
FILE *fp;
+ if (!exists("/etc/fstab"))
+ return NULL;
+
fp = setmntent("/etc/fstab", "r");
while ((ent = getmntent(fp)))
if (strcmp(file, ent->mnt_dir) == 0)