diff --git a/src/fs.cc b/src/fs.cc index 6800ed4c..067c99b7 100644 --- a/src/fs.cc +++ b/src/fs.cc @@ -151,13 +151,13 @@ void get_fs_type(const char *path, char *result) #else /* HAVE_STRUCT_STATFS_F_FSTYPENAME */ struct mntent *me; - FILE *mtab = setmntent("/etc/mtab", "r"); + FILE *mtab = setmntent("/proc/mounts", "r"); char *search_path; int match; char *slash; if (mtab == NULL) { - NORM_ERR("setmntent /etc/mtab: %s", strerror(errno)); + NORM_ERR("setmntent /proc/mounts: %s", strerror(errno)); strncpy(result, "unknown", DEFAULT_TEXT_BUFFER_SIZE); return; } diff --git a/src/linux.cc b/src/linux.cc index 40bf4bd9..664ddf5e 100644 --- a/src/linux.cc +++ b/src/linux.cc @@ -143,7 +143,7 @@ int check_mount(struct text_object *obj) if (!obj->data.s) return 0; - if ((mtab = fopen("/etc/mtab", "r"))) { + if ((mtab = fopen("/proc/mounts", "r"))) { char buf1[256], buf2[129]; while (fgets(buf1, 256, mtab)) {