Warn if Finit fail to mount /proc and /sys

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2019-02-05 10:31:36 +01:00
1 parent d7da177742
commit 2094d2a53a
1 file changed
+4 -2
+4 -2
View File
@@ -345,8 +345,10 @@ int main(int argc, char* argv[])
*/
chdir("/");
umask(0);
mount("none", "/proc", "proc", 0, NULL);
mount("none", "/sys", "sysfs", 0, NULL);
if (mount("none", "/proc", "proc", 0, NULL))
_pe("Failed mounting /proc");
if (mount("none", "/sys", "sysfs", 0, NULL))
_pe("Failed mounting /sysfs");
if (fisdir("/proc/bus/usb"))
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);