On Mon, 23 Apr 2007, Greg KH wrote: > > On the other hand, maybe it doesn't really matter. Looking again, I see > > the device's directory in sysfs contains a symlink to the class device: > > > > lrwxrwxrwx 1 root root 0 Apr 23 18:11 usb1/usb_device:usbdev1.1 -> > > ../../../../class/usb_device/usbdev1.1/ > > I don't see that in my system, with CONFIG_SYSFS_DEPRECATED and > CONFIG_USB_DEVICE_CLASS disabled...
This was on a 2.6.20 kernel from Fedora, so it may well be out of date. Regardless, it seems clear that we need a stable way to get from the sysfs path to the usbfs path. > With CONFIG_USB_DEVICE_CLASS, the usb1 device itself has a "dev" file > which is the usbfs major:minor node. Also note that distros are now > using /dev/bus/usb/ instead of /proc/bus/usb/ but yes, the naming below > that is the same. Depends on the distribution... And having the major:minor numbers doesn't help all that much, unless the program reading those numbers has sufficient privileges to create its own device node. So they might be good for udev, but not for much else. > And I'm not all that set against having a busnum in the device > directory, feel free to send me a patch, especially as you brought up my > old position :) Okay, I will. That should be the easiest for user apps and least subject to misinterpretation or API feature drift. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel