[systemd-devel] [PATCH][usbutils] lsusb: port to hwdb

Kay Sievers kay at vrfy.org
Sun Jul 21 04:05:31 PDT 2013


On Sun, Jul 21, 2013 at 12:01 PM, Tom Gundersen <teg at jklm.no> wrote:
> On Sun, Jul 21, 2013 at 3:34 AM, Greg KH <gregkh at linuxfoundation.org> wrote:
>> Can this mean I can drop the usb.ids file from the usbutils package?  I
>> can't remember where hwdb is generated from, does it rely on the usb.ids
>> file for the initial creation?
>
> hwdb does not use the usb.ids from the usbutils package.

We download the usb.ids file from:
  http://www.linux-usb.org/usb.ids
and convert them into *.hwdb files, which end up in the binary hwdb
udev is using.

Shipping a copy of it in the usbutils package makes probably no sense
even today before using the hwdb data from udev. Almost all distros
ship
the downloaded file, which is regularly updated and ignore the one
from usbutils.

> However, hwdb only contains vendor, product, class, subclass and
> protocol. So if you drop usb.ids the rest of the information will be
> lost.
>
> Maybe split the rest out into a separate file and ship only that?
>
> Or is there a way to get this info into hwdb? Kay?

It should work to add some of that data to the existing modalias,
right? For some things we probably need to "invent" new synthetic
modaliases to query these strings. We should give it a try, I think.
Having lsusb shipping a private file only for that seems ugly.

> Also, I just realise there is also lsusb,py, which I did not port.
> What is the usecase for this? Is it also worth porting over?

I think this redundancy is just confusing and should be sorted out. If
the output mode is more useful than the one from lsusb, it probably
should be added to the C program.

The .py version has no man page, and new system commands ending in
language suffixes just don't look right. I think that should be sorted
out and only one of them should exist in the end.

Kay


More information about the systemd-devel mailing list