Re: usbutils source tree [was Re: [patch 0/7] Add usb root debugfs...]

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

 



On Sat, 25 Apr 2009, David Brownell wrote:

> On Saturday 25 April 2009, Greg KH wrote:
> > Here's the equivalent of a "stock" lsusb output in 70 lines of C code,
> 
> The useful bits are "lsusb -v".  As far as I'm concerned
> there's virtually no point to the no-params version.  ;)

It would be nice to have an option for intermediate verbosity, with 
output resembling /proc/bus/usb/devices (or Randy's shell script).  :-)

> That is, parsing and decrypting all descriptors, especially
> the class ones.

Quite right.  Note that the "descriptors" binary sysfs attribute
contains only the device, config, interface, and endpoint descriptors.  
It doesn't contain any special class-specific descriptors, such as the
report descriptors in an HID device.  You'll have to get them from the 
device.

One nice benefit of using sysfs and the "descriptors" attribute 
instead of libusb is that scanning the bus won't cause all the 
autosuspended hubs and devices to be woken up.

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