Commit 3060f59d authored by Leah Neukirchen's avatar Leah Neukirchen

scan_filesystems: on Linux, try /proc/mounts if _PATH_MOUNTED does not exist

(Discovered on WSL 1703)
parent 9ebd4931
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment