summaryrefslogtreecommitdiffstats
path: root/mtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mtab.c')
-rw-r--r--mtab.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mtab.c b/mtab.c
index e04f68f..363d3db 100644
--- a/mtab.c
+++ b/mtab.c
@@ -99,6 +99,10 @@ struct bfs_mtab *parse_bfs_mtab() {
FILE *file = setmntent(_PATH_MOUNTED, "r");
if (!file) {
+ // In case we're in a chroot or something with /proc but no /etc/mtab
+ file = setmntent("/proc/mounts", "r");
+ }
+ if (!file) {
goto fail;
}