]> git.zerfleddert.de Git - usb-driver/blobdiff - usb-driver.c
support for ISE 12
[usb-driver] / usb-driver.c
index e2f275f5403623e567f1fe816e01ddf500f90031..504a278b39df45afa7c9bdab6ce90f9d7408445e 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;
@@ -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;
+}
Impressum, Datenschutz