[systemd-devel] [systemd-commits] 8 commits - src/libsystemd src/network src/shared src/systemd

Lennart Poettering lennart at poettering.net
Tue Dec 2 06:46:52 PST 2014


On Tue, 02.12.14 13:42, David Herrmann (dh.herrmann at gmail.com) wrote:

> Hi
> 
> On Tue, Dec 2, 2014 at 1:18 PM, Lennart Poettering
> <lennart at poettering.net> wrote:
> > On Tue, 02.12.14 01:50, Tom Gundersen (tomegun at kemper.freedesktop.org) wrote:
> >> +        udev_list_entry_foreach(entry, udev_hwdb_get_properties_list_entry(hwdb, str, 0))
> >> +                if (strcmp(udev_list_entry_get_name(entry), "ID_OUI_FROM_DATABASE") == 0) {
> >> +                        description = strdup(udev_list_entry_get_value(entry));
> >> +                        if (!description)
> >> +                                return -ENOMEM;
> >> +
> >> +                        *ret = description;
> >> +                        return 0;
> >> +                }
> >
> > Hmm, why not just call udev_device_get_property_value()?
> 
> That would require a udev_device, but we just have the RTNL
> information at this point. That's why we have to query the hwdb
> directly, instead of a udev-device. We might wanna add a
> udev_hwdb_get_property_value() just like the udev-device equivalent,
> though.

Ah, sorry, I wasn't really awake when I read the code, didn't realize
this was reading directly from hwdb, not from a udev db. 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list