SOURCES: libusb-urb.patch (NEW) - restored (*NOT* obsoleted yet)

freetz freetz at pld-linux.org
Sat Feb 11 14:53:29 CET 2006


Author: freetz                       Date: Sat Feb 11 13:53:29 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- restored (*NOT* obsoleted yet)

---- Files affected:
SOURCES:
   libusb-urb.patch (1.2 -> 1.3)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/libusb-urb.patch
diff -u /dev/null SOURCES/libusb-urb.patch:1.3
--- /dev/null	Sat Feb 11 14:53:29 2006
+++ SOURCES/libusb-urb.patch	Sat Feb 11 14:53:24 2006
@@ -0,0 +1,33 @@
+diff -aurN libusb-0.1.11.orig/linux.c libusb-0.1.11/linux.c
+--- libusb-0.1.11.orig/linux.c	2006-01-20 00:25:05.000000000 +0100
++++ libusb-0.1.11/linux.c	2006-02-11 14:50:27.087876472 +0100
+@@ -560,7 +560,9 @@
+     for (i = 0; i < portinfo.numports; i++)
+       if (portinfo.port[i])
+         dev->num_children++;
+-
++    
++    if (dev->children)
++	free(dev->children);	
+     dev->children = malloc(sizeof(struct usb_device *) * dev->num_children);
+     if (!dev->children) {
+       if (usb_debug > 1)
+@@ -633,14 +635,11 @@
+   }
+ 
+   if (!usb_path[0]) {
+-    if (check_usb_vfs("/proc/bus/usb")) {
+-      strncpy(usb_path, "/proc/bus/usb", sizeof(usb_path) - 1);
++    if (check_usb_vfs("/dev/bus/usb")) {
++      strncpy(usb_path, "/dev/bus/usb", sizeof(usb_path) - 1);
+       usb_path[sizeof(usb_path) - 1] = 0;
+-    } else if (check_usb_vfs("/sys/bus/usb")) { /* 2.6 Kernel with sysfs */
+-      strncpy(usb_path, "/sys/bus/usb", sizeof(usb_path) -1);
+-      usb_path[sizeof(usb_path) - 1] = 0;
+-    } else if (check_usb_vfs("/dev/usb")) {
+-      strncpy(usb_path, "/dev/usb", sizeof(usb_path) - 1);
++    } else if (check_usb_vfs("/proc/bus/usb")) {
++      strncpy(usb_path, "/proc/bus/usb", sizeof(usb_path) - 1);
+       usb_path[sizeof(usb_path) - 1] = 0;
+     } else
+       usb_path[0] = 0;	/* No path, no USB support */
================================================================


More information about the pld-cvs-commit mailing list