]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/udev/udev-builtin-net_id.c
udev: net_id: search parent devices for PCI slot number
authorStuart Hayes <stuart_hayes@dell.com>
Tue, 16 Jan 2018 21:08:10 +0000 (16:08 -0500)
committerStuart Hayes <stuart_hayes@dell.com>
Mon, 26 Mar 2018 17:57:12 +0000 (13:57 -0400)
commit9009d3b5c3b6d191be69215736be77583e0f23f9
treecd313feed38c8bbb5edbf94b0a86caacf1a12891
parent303d6b4ca6ebadca2f6faf63a76743e22efba242
udev: net_id: search parent devices for PCI slot number

To generate predictable network device names, the code in
udev-builting-net_id.c tries to match the PCI device address
of the network device to the entries in /sys/bus/pci/slots.
However, sometimes the slot number is not associated the
network controller PCI device itself, but rather with one of
its parents.

This change will try to find a match in /sys/bus/pci/slots for
the parents of the PCI network device, if it doesn't find a
match for the device itself.
src/udev/udev-builtin-net_id.c