Opened 18 years ago

Last modified 18 years ago

#1680 closed defect

/proc/bus/usb is obsolete — at Version 1

Reported by: alexander@… Owned by: blfs-book@…
Priority: normal Milestone: 6.2.0
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by alexander@…)

While the instructions at the libusb page still work with linux-2.6.14, they describe the obsolete setup. The /proc/bus/usb mount should go away, and libusb should be patched to take advantage of real raw usb device nodes. Use this raw message as a patch for libusb:

http://marc.theaimsgroup.com/?l=linux-hotplug-devel&m=112447064921992&q=raw

The udev rule that is equivalent to the current setup WRT permissions is:

SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c", GROUP="usb"

(that is one long line)

Fine-tunuing of permissions is possible by creating extra rules, matching on something like this:

SUBSYSTEM=="usb_device", SYSFS{idVendor}=="05d8", SYSFS{idProduct}=="4002", GROUP:="scanner"

Change History (1)

comment:1 by alexander@…, 18 years ago

Description: modified (diff)

LFS should integrate the udev rule above.

The patch is no longer needed with libusb-0.1.12. This version of libusb first tries /dev/bus/usb (where udev creates real device nodes with the above rule) and then falls back to /proc/bus/usb (should not happen with linux >= 2.6.14 with proper udev rules, because /dev/bus/usb is always available). Thus, if all applications requiring raw access to USB devices used libusb, one could remove the /proc/bus/usb mount. Unfortunately, VMware and other proprietary apps beyond BLFS may still need this obsolete mount point because they don't use libusb.

/dev/bus/usb and /proc/bus/usb don't conflict. It's just that udev can't be used to set /proc/bus/usb permissions reliably.

Note: See TracTickets for help on using tickets.