[systemd-devel] [PATCH 1/2] libsystemd: add sd-hwdb library

Lennart Poettering lennart at poettering.net
Wed Dec 3 16:12:20 PST 2014


On Thu, 04.12.14 00:57, Tom Gundersen (teg at jklm.no) wrote:

> On Wed, Dec 3, 2014 at 10:19 PM, Greg KH <gregkh at linuxfoundation.org> wrote:
> > On Wed, Dec 03, 2014 at 10:11:40PM +0100, Tom Gundersen wrote:
> >> This is libudev-hwdb, but decoupled from libudev and in the libsystemd style.
> >>
> >> The core code is unchanged, apart from the following minor changes:
> >>
> >>  - hwdb.bin located in /**/systemd/hwdb/ take preference over the ones located
> >>    in /**/udev/
> >>  - properties are stored internally in an OrderedHashmap, rather than a
> >>    linked list.
> >>  - a new API call allows individual properties to be queried directly, rather
> >>    than iterating over them all
> >>  - the iteration over properties have been moved inside the library, rather than
> >>    exposing a list directly
> >>  - the unused 'flags' parameter was dropped
> >
> > Why pull this apart?
> 
> We'd like to move the libudev API closer to the libsystemd one, and as
> the hwdb stuff is actually completely separate from the rest of
> libudev, it is a nice place to start I thought. The benefit is rather
> minor (consistency of API and improved error handling), but still
> worth-while I think.
> 
> One point though, which I forgot to mention in the patch description,
> is that one more change is made: I dropped the unused struct udev
> context and didn't replace it with anything else. I think this fits
> with how other things are done in libsystemd, but it _is_ nice to have
> a context around for future extensions... What do you think Kay?

Well, if you have "sd_hwdb" now as new context object, that should be
more than enough.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list