From: Michael Gernoth Date: Thu, 27 Nov 2008 14:11:07 +0000 (+0100) Subject: Let usb-driver work with a no-module kernel by Gyorgy 'nog' Jeney X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/aed36bb341eaa4344cb548a6e78c5ac94b03a6cd Let usb-driver work with a no-module kernel by Gyorgy 'nog' Jeney --- diff --git a/usb-driver.c b/usb-driver.c index e2f275f..264366b 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -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;