[systemd-devel] Using the hwdb in external programs

2013-08-14 Thread Richard Hughes
Hi all, I'm aware of at least half a dozen programs and daemons that read and parse /usr/share/hwdata/pnp.ids to convert PNP_IDS to actual vendor names. Although this file will be in hot cache at login, it does seem a waste of a lot of duplicated parsing and hashing code. I'm aware the PNP_ID

Re: [systemd-devel] Using the hwdb in external programs

2013-08-14 Thread Kay Sievers
On Wed, Aug 14, 2013 at 12:03 PM, Richard Hughes hughsi...@gmail.com wrote: I'm aware of at least half a dozen programs and daemons that read and parse /usr/share/hwdata/pnp.ids to convert PNP_IDS to actual vendor names. Although this file will be in hot cache at login, it does seem a waste of

Re: [systemd-devel] Using the hwdb in external programs

2013-08-14 Thread Richard Hughes
On 14 August 2013 11:41, Kay Sievers k...@vrfy.org wrote: An example is here: http://cgit.freedesktop.org/systemd/systemd/tree/src/test/test-libudev.c#n432 Great! Thanks. So I know what to use where, what's the cost of those functions? For instance, is udev_hwdb_new() going to use globs of

Re: [systemd-devel] Using the hwdb in external programs

2013-08-14 Thread Kay Sievers
On Wed, Aug 14, 2013 at 1:06 PM, Richard Hughes hughsi...@gmail.com wrote: On 14 August 2013 11:41, Kay Sievers k...@vrfy.org wrote: An example is here: http://cgit.freedesktop.org/systemd/systemd/tree/src/test/test-libudev.c#n432 Great! Thanks. So I know what to use where, what's the