#1680: /proc/bus/usb is obsolete
--------------------------------------------+-------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  [email protected]
     Type:  defect                          |       Status:  new                
           
 Priority:  high                            |    Milestone:  future             
           
Component:  BOOK                            |      Version:  a-SVN              
           
 Severity:  normal                          |   Resolution:                     
           
 Keywords:                                  |  
--------------------------------------------+-------------------------------
Old description:

> 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"

New description:

 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"

Comment (by [EMAIL PROTECTED]):

 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.

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/1680>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to