On Tue, 02.12.14 13:42, David Herrmann ([email protected]) wrote:

> Hi
> 
> On Tue, Dec 2, 2014 at 1:18 PM, Lennart Poettering
> <[email protected]> wrote:
> > On Tue, 02.12.14 01:50, Tom Gundersen ([email protected]) 
> > 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
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to