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

David Herrmann dh.herrmann at gmail.com
Tue Dec 2 04:42:41 PST 2014


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.

Thanks
David


More information about the systemd-devel mailing list