rpms/libusb/devel libusb-0.1.11-searchorder.patch, NONE, 1.1 libusb.spec, 1.20, 1.21

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Jan 27 09:25:51 UTC 2006


Author: jnovy

Update of /cvs/dist/rpms/libusb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21948

Modified Files:
	libusb.spec 
Added Files:
	libusb-0.1.11-searchorder.patch 
Log Message:
* Fri Jan 27 2006 Jindrich Novy <jnovy at redhat.com> 0.1.11-2
- change device search order, /dev/bus/usb is tried first,
  then /proc/bus/usb, and never try /sys/bus/usb (#178994)


libusb-0.1.11-searchorder.patch:
 linux.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

--- NEW FILE libusb-0.1.11-searchorder.patch ---
--- libusb-0.1.11.orig/linux.c
+++ libusb-0.1.11/linux.c
@@ -633,14 +633,11 @@
   }

   if (!usb_path[0]) {
-    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 if (check_usb_vfs("/sys/bus/usb")) { /* 2.6 Kernel with sysfs */
-      strncpy(usb_path, "/sys/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("/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 */




Index: libusb.spec
===================================================================
RCS file: /cvs/dist/rpms/libusb/devel/libusb.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- libusb.spec	22 Jan 2006 10:12:43 -0000	1.20
+++ libusb.spec	27 Jan 2006 09:25:47 -0000	1.21
@@ -1,9 +1,10 @@
 Summary: A library which allows userspace access to USB devices.
 Name: libusb
 Version: 0.1.11
-Release: 1
+Release: 2
 Source0: http://prdownloads.sourceforge.net/libusb/%{name}-%{version}.tar.gz
 Patch0: libusb-0.1.11-format.patch
+Patch1: libusb-0.1.11-searchorder.patch
 License: LGPL
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -27,6 +28,7 @@
 %prep
 %setup -q
 %patch0 -p1 -b .format
+%patch1 -p1 -b .searchorder
 
 # Fix libdir in configure.in.
 mv -f configure.in configure.in.old
@@ -71,6 +73,10 @@
 
 
 %changelog
+* Fri Jan 27 2006 Jindrich Novy <jnovy at redhat.com> 0.1.11-2
+- change device search order, /dev/bus/usb is tried first,
+  then /proc/bus/usb, and never try /sys/bus/usb (#178994)
+
 * Fri Jan 20 2006 Jindrich Novy <jnovy at redhat.com> 0.1.11-1
 - 0.1.11
 - require pkgconfig, package libusb.pc




More information about the fedora-cvs-commits mailing list