mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 14:02:52 +07: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:
+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