]> git.zerfleddert.de Git - usb-driver/commitdiff
Let usb-driver work with a no-module kernel by Gyorgy 'nog' Jeney
authorMichael Gernoth <michael@gernoth.net>
Thu, 27 Nov 2008 14:11:07 +0000 (15:11 +0100)
committerMichael Gernoth <michael@gernoth.net>
Thu, 27 Nov 2008 14:11:07 +0000 (15:11 +0100)
usb-driver.c

index e2f275f5403623e567f1fe816e01ddf500f90031..264366bac6bcb075a1574b9bc9a41bdfe4c24aa1 100644 (file)
@@ -559,6 +559,12 @@ FILE *fopen(const char *path, const char *mode) {
 
        if (!strcmp(path, "/proc/modules")) {
                DPRINTF("opening /proc/modules\n");
+               if (!ret && errno == ENOENT) {
+                       /* Hmm.. there appears to be no /proc/modules file
+                        * fake it then */
+                       ret = (*func)("/dev/null", mode);
+                       DPRINTF("No /proc/modules -- faking\n");
+               }
 #ifdef NO_WINDRVR
                modulesfp = ret;
                modules_read = 0;
Impressum, Datenschutz