mirror of
https://github.com/troglobit/finit.git
synced 2026-10-21 11:29:42 +00:00
Only mount /proc if it isn't already mounted
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e16a6ad4f0
commit
5fd5e722a8
1 file changed
+1
-1
+1
-1
@@ -350,7 +350,7 @@ int main(int argc, char *argv[])
|
|||||||
/*
|
/*
|
||||||
* Mount base file system
|
* Mount base file system
|
||||||
*/
|
*/
|
||||||
if (mount("none", "/proc", "proc", 0, NULL))
|
if (!fismnt("/proc") && mount("none", "/proc", "proc", 0, NULL))
|
||||||
_pe("Failed mounting /proc");
|
_pe("Failed mounting /proc");
|
||||||
if (fisdir("/proc/bus/usb"))
|
if (fisdir("/proc/bus/usb"))
|
||||||
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);
|
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);
|
||||||
|
|||||||
Reference in new issue
Block a user