From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lennart Poettering Date: Tue, 28 Dec 2010 23:58:13 +0000 Subject: Re: PCI/USB Vendor and model from database Message-Id: <20101228235813.GA4564@tango.0pointer.de> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Tue, 28.12.10 14:14, Jos=E9 F=E9lix Onta=F1=F3n (felixonta@gmail.com) wr= ote: > Hi, everybody! >=20 > Maybe this is kinda silly question but, I wonder why isn't > "ID_VENDOR_FROM_DATABASE / ID_MODEL_FROM_DATABASE"-like properties > imported by default using the pretty /lib/udev/usb-db and > /lib/udev/pci-db commands for every founded pci/usb device? >=20 > I mean, by adding this simple rules: >=20 > SUBSYSTEMS=3D"usb", IMPORT{program}=3D"usb-db %p" > SUBSYSTEMS=3D"pci", IMPORT{program}=3D"pci-db %p" >=20 > I think this properties are very useful for apps that discover > hardware through udev, so they will not have to reinvent the wheel by > finding vendor/product names by themselves. Don't you think? The database lookup is a linear search. As long as we invoke it only for a small subset of devices that doesn't really matter much. But if we start to look it up for every device we should probably spend the time to improve the db lookup first. It's simply a question of efficiency. Lennart --=20 Lennart Poettering - Red Hat, Inc.