about summary refs log tree commit diff
path: root/lr.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-11-04 00:39:48 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-11-04 00:39:48 +0100
commit3060f59da9d6c8857996172290b4a9004a938281 (patch)
tree9f9a655f21194d965c905d3f62a786c408f052c7 /lr.c
parent9ebd4931e83d270065c133d9de1daf38e5886268 (diff)
downloadlr-3060f59da9d6c8857996172290b4a9004a938281.tar.gz
lr-3060f59da9d6c8857996172290b4a9004a938281.tar.xz
lr-3060f59da9d6c8857996172290b4a9004a938281.zip
scan_filesystems: on Linux, try /proc/mounts if _PATH_MOUNTED does not exist
(Discovered on WSL 1703)
Diffstat (limited to 'lr.c')
-rw-r--r--lr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lr.c b/lr.c
index b8c135c..4d897b8 100644
--- a/lr.c
+++ b/lr.c
@@ -985,6 +985,8 @@ scan_filesystems()
 	 * this will fail if we are not allowed to read the mountpoint, but then
 	 * we should not have to look up this st_dev value... */
 	mtab = setmntent(_PATH_MOUNTED, "r");
+	if (!mtab && errno == ENOENT)
+		mtab = setmntent("/proc/mounts", "r");
 	if (!mtab)
 		return;