From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lennart Poettering Date: Tue, 29 Sep 2009 22:48:07 +0000 Subject: Re: [PATCH] Add compressed ID database support to (usb|pci)-db Message-Id: <20090929224806.GC5446@tango.0pointer.de> List-Id: References: <4AB83999.1060004@unitednerds.org> In-Reply-To: <4AB83999.1060004@unitednerds.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, 21.09.09 23:42, Piter PUNK (piterpunk@unitednerds.org) wrote: > Hi Heya, > usbutils and pciutils have support to gzip'ed ID databases. But, if > I use usb.ids.gz or pci.ids.gz, usb-db and pci-db can't show > anything, giving only an error of file not found. Looking in the > code, they didn't have any support to compressed ID files. > > This patch add support to gzip'ed database files to usb-db.c and add > the option --disable-zlib to configure.ac. Most of code here come > from usbutils names.c file with little modifications to work with > udev. Patch looks mstly good. However after discussing this a little with Kay we'd prefer if we could do without the macro orgy and just depend unconditionally on zlib. Given that this is in extras this should not be a problem. That said, generally speaking it's bad enough that we do a linar search for the vid/pid. Compressing things won't make things faster. Is there actually a distribution that uses a compressed pci.ids file? > diff --git a/configure.ac b/configure.ac > index 3afb94a..5a273e6 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -6,7 +6,7 @@ AC_DISABLE_STATIC > AC_USE_SYSTEM_EXTENSIONS > AC_SYS_LARGEFILE > AC_CONFIG_MACRO_DIR([m4]) > -LT_INIT > +m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL]) Uh, this shouldn't be sneaked in here. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4