[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev and /usr



Julien Cristau wrote:
> On Mon, Sep  7, 2009 at 05:15:19 +0200, Michael Biebl wrote:
> 
>> From what I can see in /lib/udev/rules.d, the ids files are only used to setup
>> the (udev) environment variable ID_VENDOR_FROM_DATABASE
>> (75-net-description.rules, 75-tty-description.rules, 78-sound-card.rules).
>>
>> There are no symlinks created in /dev based on that information.
>>
>> Given the name of the rules file, it indeed looks to be intended to be used for
>> display/descriptive purposes.
>>
> 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.

But that is just guessing. Maybe we should simply ask udev upstream (CCed)

@Kay: the start of the discussion is at [1]

Cheers,
Michael

[1] http://lists.debian.org/debian-devel/2009/09/msg00002.html
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: