Le lundi 07 septembre 2009 à 17:29 +0200, Michael Biebl a écrit : > > So, again, why can't the programs that want to display this do the > > lookup themselves? Both libpciaccess and libpci provide API for this as > > far as I can tell. > > I am sure, they could. My guess is, it was added to udev to make porting apps > from HAL to lib(g)udev easier and more convenient as you only have one API to > write against (as you had with HAL) > To get the information from pci.ids/usb.ids, you'd need to link to both libpci > (and libusb, I guess) and write different code for the usb and pci case. > A > char *vendor = g_udev_device_get_property (device, "ID_VENDOR_FROM_DATABASE"); > is certainly a lot easier.
Wouldn’t it be possible to let libgudev itself do the job? OTOH it would then link to libpci and libusb, but that may be a better solution. Cheers, -- .''`. Josselin Mouette : :' : `. `' “I recommend you to learn English in hope that you in `- future understand things” -- Jörg Schilling
signature.asc
Description: Ceci est une partie de message numériquement signée