Previously the -v output would not show the vendor/product names if they
were not in the hwdb. Change that to look in sysfs as well if the
database does not have a string, as that's what the non-v version does.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This function was added to names.c by commit dddb696e01 ("lsusb: Read
unkown names from sysfs device desc."), but it doesn't really belong
there: sysfs is an entirely different data source from the udev hwdb
that names.c works with, and this function both does things (like
directly accessing files) that other functions in names.c don't and
doesn't do things (like depending on the work done by names_init()) that
those other functions do.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Use the C standard uint*_t variable types, not the "unix" types of
u_int*_t as we should be able to all finally agree on one type of C
variables.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lsusb tries to get the names for manufacturer and product of a device by
asking the udev hwdb for the names of the device id.
Not every manufacturer and device are in this database. Most devices
however provide those names in the standard USB descriptors, namely
iManufacturer and iProduct.
To get those with libusb we would have to open the device which
requires superuser privileges. To get those values anyway the kernel
provides them in sysfs.
Signed-off-by: Daniel Schaefer <git@danielschaefer.me>
This removes the "boiler-plate" license texts in the individual files to
use SPDX identifiers instead. Cleans up the text a lot.
All copyright notices were left intact, as this does not change
anything.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Also remove usb.ids from the repository. [Note that these were probably
never used by distributions regarless, as most distros ship the usb.ids
directly from upstream.]
Hardcode the usb-spec information that used to be in usb.ids,
but which was not moved to hwdb.
Increase the size of tha hash table from 16 to 512, though using a
hash at all is probably overkill at this point.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This fixes the annoying "bInterfaceClass 0x0e not yet handled" messages
in 'lsusb -t' for video devices, and will handle any future class types
as well.
Just one step in merging 'lsusb -t' into the main portion of the program
instead of really just being a stand-alone program.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [usbutils] Patch to support reporting of keyboard country type
Date: Thu, 18 Mar 2004 10:58:31 +0100
Hi Thomas !
Please find attached a patch against the current CVS that I received
viathe Debian Bug Tracking System. It looks up the decimal HID Country
Code in usb.ids and reports it when "lsusb -v" is used on an HID
device.
For most cheap PC USB keyboards the data may be misleading, as they
commonly report as 00 or 33 types regardless of mapping. However, Sun
and Apple kit uses the extension.
The list of HID Country Code has already been integrated into
usb.ids.You may have to update the version in the CVS from
http://linux-usb.org
Regards,
Aurelien