From mboxrd@z Thu Jan 1 00:00:00 1970 From: Piter PUNK Date: Wed, 23 Sep 2009 04:33:11 +0000 Subject: Re: [PATCH] Add compressed ID database support to (usb|pci)-db Message-Id: <4AB9A507.5010006@unitednerds.org> List-Id: References: <4AB83999.1060004@unitednerds.org> In-Reply-To: <4AB83999.1060004@unitednerds.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: linux-hotplug@vger.kernel.org Ozan Çağlayan wrote: > Piter PUNK wrote: > >> 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. >> > Looking at the code it seems that enabling zlib support sets HAVE_ZLIB > which assumes that the DBs are always compressed with gzip which removes > the support for uncompressed db files. Logically, both should be > supported with some kind of file format detection. > zlib functions can read compressed and uncompressed files. That's why I try to open DATABASE.gz first and, if failed, open DATABASE when zlib support is enabled. The support of both file formats is OK when zlib is enabled. When disabled, only uncompressed files are supported. Almost no changes there. The only drawback of enable zlib support is the need of zlib shared library. But, who are using gzip'ed ID db files already needs zlib to have working lsusb and lspci. > Ignore this if I wrongly understand the intention :) > Oh, i think is better to explain. Maybe someone else have the same doubt. Hope it's all OK now -:) Piter Punk