Only mount /proc if it isn't already mounted

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2020-04-26 15:05:17 +02:00
parent e16a6ad4f0
commit 5fd5e722a8
+1 -1
View File
@@ -350,7 +350,7 @@ int main(int argc, char *argv[])
/*
* Mount base file system
*/
if (mount("none", "/proc", "proc", 0, NULL))
if (!fismnt("/proc") && mount("none", "/proc", "proc", 0, NULL))
_pe("Failed mounting /proc");
if (fisdir("/proc/bus/usb"))
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);