diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-11-04 00:39:48 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-11-04 00:39:48 +0100 |
commit | 3060f59da9d6c8857996172290b4a9004a938281 (patch) | |
tree | 9f9a655f21194d965c905d3f62a786c408f052c7 | |
parent | 9ebd4931e83d270065c133d9de1daf38e5886268 (diff) | |
download | lr-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)
-rw-r--r-- | lr.c | 2 |
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; |