[Toybox] new toy: lsusb

Rob Landley rob at landley.net
Tue May 14 22:20:27 PDT 2013


On 05/15/2013 12:06:09 AM, Andre Renaud wrote:
> As a separate feature (I'm not suggesting we actually use this patch),
> lsusb is supposed to parse /usr/share/misc/usb.ids to get readable
> names for devices.

You're way ahead of me. :)

> Obviously for space reasons we don't want to use this file.

If the file exists at /etc/usb.ids we could parse it, but since you  
found info provided by the drivers, using that makes sense.

> However most devices identify themselves with some kind of
> readable string, so alternatively we could just display these strings
> to the user. Not all devices have this information, but it's pretty
> low overhead. Attached is a patch which adds this functionality. On my
> PC it gives moderately useful information about most of the normal
> peripherals, however some of the internal ones are a bit useless.
> 
> I re-instated readfile as a convenience.

I fiddled with this code earlier this evening, so the patch doesn't  
apply. I can adapt this to what's currently there but it's after  
midnight, so probably tomorrow.

> Regards,
> Andre

Thanks,

Rob


More information about the Toybox mailing list