mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
Check if /proc/bus/usb exists before trying to mount it
Most newer kernels have usbfs disabled by default. See issue #69 for details. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
37d391d53a
commit
c135a83cb3
1 file changed
+2
-1
+2
-1
@@ -257,8 +257,9 @@ int main(int argc, char* argv[])
|
||||
chdir("/");
|
||||
umask(0);
|
||||
mount("none", "/proc", "proc", 0, NULL);
|
||||
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);
|
||||
mount("none", "/sys", "sysfs", 0, NULL);
|
||||
if (fisdir("/proc/bus/usb"))
|
||||
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);
|
||||
|
||||
/*
|
||||
* Check file filesystems in /etc/fstab
|
||||
|
||||
Reference in new issue
Block a user