X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/blobdiff_plain/1fc8f7a47d7d6db0c7ef6f554595670124b319c5..b316fb2f6fab6acf253eb4fbe67213ebb9baf202:/usb-driver.c diff --git a/usb-driver.c b/usb-driver.c index e2f275f..504a278 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; @@ -666,3 +672,11 @@ int uname (struct utsname *__name) { return ret; } #endif + +/* Ugly hack for ISE 12. They don't seem to open /proc/modules with + * open() anymore... */ +int _Z14isModuleLoadedPci(void) { + DPRINTF("Faking _Z14isModuleLoadedPci\n"); + + return 1; +}