]> git.zerfleddert.de Git - usb-driver/commitdiff
be compatible with libusb-versions without dev->devnum member
authorMichael Gernoth <michael@gernoth.net>
Thu, 6 Sep 2007 15:31:44 +0000 (17:31 +0200)
committerMichael Gernoth <michael@gernoth.net>
Thu, 6 Sep 2007 15:31:44 +0000 (17:31 +0200)
usb-driver.c

index 929c1019484581a25a1ae33986583585f936ff39..27a9580a4ade4c06b27d5049edb98ef5ea773692 100644 (file)
@@ -534,7 +534,7 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
                                                           (desc->idProduct == e->matchTables[i].ProductId) &&
                                                           (desc->bDeviceClass == e->matchTables[i].bDeviceClass) &&
                                                           (desc->bDeviceSubClass == e->matchTables[i].bDeviceSubClass) &&
                                                           (desc->idProduct == e->matchTables[i].ProductId) &&
                                                           (desc->bDeviceClass == e->matchTables[i].bDeviceClass) &&
                                                           (desc->bDeviceSubClass == e->matchTables[i].bDeviceSubClass) &&
-                                                          ((devnum == -1) || (dev->devnum == devnum)) ) {
+                                                          ((devnum == -1) || (strtol(dev->filename, NULL, 10) == devnum)) ) {
                                                                   int ac;
                                                                   for (ac = 0; ac < desc->bNumConfigurations; ac++) {
                                                                           struct usb_interface *interface = dev->config[ac].interface;
                                                                   int ac;
                                                                   for (ac = 0; ac < desc->bNumConfigurations; ac++) {
                                                                           struct usb_interface *interface = dev->config[ac].interface;
Impressum, Datenschutz