Skip to contentSkip to conversation

lsusb: port to hwdb

PATCH Applied Tom Gundersen 2 participants 5 messages Sep 4, 2013 – Sep 13, 2013 1 message not in the archive Kbuild

lore
Share & tools
lore
#0 lore raw

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

Cc Greg Kroah-Hartman <[email protected]>
---
 Makefile.am  |   5 +-
 configure.ac |   2 +
 names.c      | 361 +++++++----------------------------------------------------
 3 files changed, 45 insertions(+), 323 deletions(-)
Makefile.am +3 -2
index 1e85a1e..70b9de9 100644
@@ -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
index adfb4b6..b4b0880 100644
@@ -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
#1 lore raw
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

#2 lore raw
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

#3 lore raw
In reply to Tom Gundersen
Quoted 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]

#5 lore raw

Re: [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