From 3060f59da9d6c8857996172290b4a9004a938281 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 4 Nov 2017 00:39:48 +0100 Subject: scan_filesystems: on Linux, try /proc/mounts if _PATH_MOUNTED does not exist (Discovered on WSL 1703) --- lr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lr.c') 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; -- cgit 1.4.1