X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/blobdiff_plain/25ba7a49098fb2f4c120293d8f7c7404e5d3687b..3eee002c15edabb57e820b2b79d664cacbdbce56:/usb-driver.c?ds=inline diff --git a/usb-driver.c b/usb-driver.c index 513fc3e..18d6331 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -245,7 +245,7 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { switch(request & ~(0xc0000000)) { case VERSION: version = (struct version_struct*)(wdheader->data); - strcpy(version->version, "libusb-driver.so $Revision: 1.68 $"); + strcpy(version->version, "libusb-driver.so version: " USB_DRIVER_VERSION); version->versionul = 802; DPRINTF("VERSION\n"); break; @@ -276,6 +276,9 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { #else pport = config_get((unsigned long)cr->Card.Item[0].I.IO.dwAddr / 0x10); + if (!pport) + break; + ret = pport->open((unsigned long)cr->Card.Item[0].I.IO.dwAddr / 0x10); ppbase = (unsigned long)cr->Card.Item[0].I.IO.dwAddr; @@ -887,6 +890,9 @@ int access(const char *pathname, int mode) { if (!func) func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access"); + + if (!pathname) + return -1; if (!strcmp(pathname, "/dev/windrvr6")) { return 0;