[systemd-devel] [PATCH] udev: make net_id more robust

Koen Kooi koen at dominion.thruhere.net
Tue Jun 18 06:19:56 PDT 2013


Op 7 jun. 2013, om 20:25 heeft Kay Sievers <kay at vrfy.org> het volgende geschreven:

> On Fri, Jun 7, 2013 at 3:27 PM, Sean McGovern <gseanmcg at gmail.com> wrote:
>> Onboard network controllers are not always on PCI domain 0.
> 
>> +        sysname = udev_device_get_sysname(names->pcidev);
>> +
>> +        if(!sysname)
>> +            return -ENOENT;
>> +
>> +        if(!strlen(sysname))
>> +            return -ENOENT;
> 
> None of these checks should be needed.
> 
>> +        if(sscanf(sysname, "%lx:%x:%x.%d", &domain, &bus, &slot, &func) != 4)
>> +            return -ENOENT;
> 
> We only support domain 0, and ignore all other devices so far.

What about non-PCI devices, like the netwerk controllers in embedded SoCs?

regards,

Koen


More information about the systemd-devel mailing list