From: Linus Walleij Date: Thu, 26 Jan 2006 10:16:59 +0000 Subject: Re: [Libusb-devel] udev craze: need /dev/bus/usb rationale Message-Id: List-Id: References: <20060126094517.GA4063@bode.aurel32.net> In-Reply-To: <20060126094517.GA4063@bode.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, 26 Jan 2006, Aurelien Jarno wrote: > Wrong! Debian uses the following rule: Ah you already found the problem. Mea culpa... Then this other thing: > with the following patch to libusb to open /dev/bus/usb prior to > /proc/bus/usb: > > --- 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 */ > > (...) > > On Debian, the names are in the form /dev/bus/usb/002/004, ie the same > format as in /proc/bus/usb. This is good and seems to be the current rationale. Kay also use /dev/bus/usb. Could this patch be applied to libusb so we confirm this choice of using /dev/bus/usb instead of just /dev/usb as the source says right now? Linus ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel