Re: [PATCH] USB: usbfs: deprecate and hide option for !embedded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Apr 2009, Greg KH wrote:

> On Tue, Apr 21, 2009 at 12:52:12PM -0400, Alan Stern wrote:
> > On Tue, 21 Apr 2009, Scott James Remnant wrote:
> > 
> > > Modern systems do not use usbfs; the entries within it are files,
> > > not device nodes, and do not support ACLs which are the default way to
> > > provide access to USB devices to untrusted users.
> > > 
> > > It is replaced by device-nodes maintained by udev in /dev/bus/usb,
> > > libusb uses this device nodes.
> > > 
> > > Mark the option as deprecated, and hide entirely for non-embedded builds
> > > (which may not be using udev but require raw USB device access).
> > 
> > I don't like this at all.  usbfs provides /proc/bus/usb/devices, and 
> > some of the information in that file is not easily available anywhere 
> > else.
> 
> What is lacking in sysfs?  Here's a script from Randy Dunlap that pretty
> much provides the equilivant.

That's a nice script.  Translating it into Perl might speed it up a 
bit.

What's missing in the script (or in sysfs)?  Several things.

	The script doesn't list the parent and port values.  No
	doubt they can be added; certainly they are present in sysfs.

	The script doesn't print bandwidth allocation information for 
	root hubs.

	You can't poll it to detect when devices are added or
	removed (although there may be other ways of doing this).

	Sysfs doesn't contain information about configurations
	other than the current one, whereas /proc/bus/usb/devices
	lists all the configs.

By contrast, lsusb _does_ print all the configs.  But the values it 
shows are taken from the device, not from the kernel's current data 
structures.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux