On Wed, Jul 27, 2005 at 09:36:13PM +0200, Kay Sievers wrote: > This patch introduces a /sys/class/usb_device/ class > where every connected usb-device will show up: > > tree /sys/class/usb_device/ > /sys/class/usb_device/ > |-- usb1.1 > | |-- dev > | `-- device -> ../../../devices/pci0000:00/0000:00:1d.0/usb1 > |-- usb2.1 > | |-- dev > | `-- device -> ../../../devices/pci0000:00/0000:00:1d.1/usb2 > ... > > The presence of the "dev" file lets udev create real device nodes. > [EMAIL PROTECTED]:~/src/linux-2.6> tree /dev/bus/usb/ > /dev/bus/usb/ > |-- 1 > | `-- 1 > |-- 2 > | `-- 1 > ... > > udev rule: > SUBSYSTEM="usb_device", PROGRAM="/sbin/usb_device %k", NAME="%c" > (echo $1 | /bin/sed 's/usb\([0-9]*\)\.\([0-9]*\)/bus\/usb\/\1\/\2/') > > This makes libusb pick up the real nodes instead of the mounted usbfs: > export USB_DEVFS_PATH=/dev/bus/usb > > Background: > All this makes it possible to manage usb devices with udev instead of > the devfs solution. We are currently working on a pam_console/resmgr > replacement driven by udev and a pam-helper. It applies ACL's to device > nodes, which is required for modern desktop functionalty like > "Fast User Switching" or multiple local login support. > > What do you think?
The idea's good, but the implementation seems a bit messy. You are reusing the USB major number for things that it was not specified for. I know in a udev managed system that's not a big deal, but we can't go breaking people who use a static /dev, right? With this patch, we just broke the /dev/usb/lp0 node, as that minor number was assigned to the root hub device. How about we just use another major number? I think I have a few free ones around here somewhere.... 189 is reserved for USB serial callout devices, and never used at all. I don't mind giving it up for this instead. thanks, greg k-h ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
