[Toybox] new toy: lsusb
Andre Renaud
andre at bluewatersys.com
Tue May 14 16:27:24 PDT 2013
Hi Rob,
On 15 May 2013 11:06, Rob Landley <rob at landley.net> wrote:
> Is there something special about the entries that have DEVTYPE= as the first
> line? Depending on the ordering seems darn subtle here. I did a quick:
You're right, relying on the order is a terrible idea (although it is
what busybox does). I'm also not too keen on using a filename wildcard
(although it's better than the ordering). However attached is a patch
that instead only lists DEVTYPE=usb_device entries.
Looking at the Linux code, these DEVTYPE entries appear as a result of
calling device_initialize with something that has it's 'type' set,
which only happens twice in the USB subsystem - once for 'usb_device'
and once for 'usb_interface'. I haven't looked closely, but I assume
that if they shuffle the order of the code within there, the
first-line assumption will be invalid. So it's better this way.
As a separate aside - what is the story with toys like this that are
strictly Linux only - is toybox a linux-only project, or are they just
tagged separately?
Regards,
Andre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lsusb.patch
Type: application/octet-stream
Size: 1367 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130515/36fff633/attachment-0007.obj>
More information about the Toybox
mailing list