lsusb: port to hwdb
PATCH 1/2 lsusb: port to hwdb
Most of the information in usb.ids is now contained in udev's hwdb. Read the information from the hwdb instead of usb.ids.
This would allow distributions to no longer ship (most of) usb.ids by default, but rather keep all the usb device information in the hwdb.
This patch introduces a dependency on libusb >= 196.
v2: drop support from reading data from usb.ids which is already in hwdb
--- Makefile.am | 5 +- configure.ac | 2 + names.c | 361 +++++++---------------------------------------------------- 3 files changed, 45 insertions(+), 323 deletions(-)
Makefile.am +3 -2
@@ -23,11 +23,12 @@ lsusb_SOURCES = \ usbmisc.c usbmisc.h lsusb_CPPFLAGS = \ - $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) \ + $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) $(UDEV_CFLAGS) \ -DDATADIR=\"$(datadir)\" lsusb_LDADD = \ - $(LIBUSB_LIBS) + $(LIBUSB_LIBS) \ + $(UDEV_LIBS) if HAVE_ZLIB lsusb_CPPFLAGS += -DHAVE_LIBZ
configure.ac +2 -0
@@ -26,6 +26,8 @@ AM_CONDITIONAL([INSTALL_USBIDS], [test "x$enable_usbids" != "xno"]) PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0) +PKG_CHECK_MODULES(UDEV, libudev >= 196) + AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ Makefile
names.c +40 -321
466 lines not on this page · raw message
Signature · 1 line
1.8.4
Quoted 7 lines · Tom Gundersen
Most of the information in usb.ids is now contained in udev's hwdb. Read the information from the hwdb instead of usb.ids.
This would allow distributions to no longer ship (most of) usb.ids by default, but rather keep all the usb device information in the hwdb.
This patch introduces a dependency on libusb >= 196.
You mean 'libudev' here, right? I don't think libusb has that version number quite yet :)
thanks,
greg k-h
Quoted 11 lines · Greg Kroah-Hartman
Quoted 7 lines · Tom Gundersen
Most of the information in usb.ids is now contained in udev's hwdb. Read the information from the hwdb instead of usb.ids.
This would allow distributions to no longer ship (most of) usb.ids by default, but rather keep all the usb device information in the hwdb.
This patch introduces a dependency on libusb >= 196.
You mean 'libudev' here, right? I don't think libusb has that version number quite yet :)
Hehe, precisely :-)
-t
Greg Kroah-Hartman
AppliedQuoted 8 lines · Tom Gundersen
Most of the information in usb.ids is now contained in udev's hwdb. Read the information from the hwdb instead of usb.ids.
This would allow distributions to no longer ship (most of) usb.ids by default, but rather keep all the usb device information in the hwdb.
This patch introduces a dependency on libusb >= 196.
Quoted 8 lines
v2: drop support from reading data from usb.ids which is already in hwdb
Cc Greg Kroah-Hartman <[email protected]>--- Makefile.am | 5 +- configure.ac | 2 + names.c | 361 +++++++---------------------------------------------------- 3 files changed, 45 insertions(+), 323 deletions(-)
Applied, thanks.
greg k-h
A message that is not in the archive (sent off-list or not yet received): [email protected]
Greg Kroah-Hartman
AppliedRe: [PATCH 2/2][usbutils] drop dependency on usb.ids
Quoted 9 lines · Tom Gundersen
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.
Applied, thanks.
greg k-h