]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev-builtin-net_id: first parse USB or BCMA identifier, then parse PCI properties 28623/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Aug 2023 13:30:57 +0000 (22:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Aug 2023 15:00:32 +0000 (00:00 +0900)
commit82cb5f2ad1d530fff7afc78eedb2d486f1ba3abf
tree062569a284d3eb2e73b5cb80662976fed3356547
parent415ade00aa6475c8d07a511dd17999fee4981aff
udev-builtin-net_id: first parse USB or BCMA identifier, then parse PCI properties

Previously, we first generate names based on the PCI slot and ACPI
onboard index, and then append an identifier based on USB or BCMA bus
if it exists in between the PCI bus and the interface.

However, if there exists USB or BCMA bus, the name based on the
ACPI onboard index is not used.

So, let's invert the order; first generate USB or BCMA identifier if the
bus exists, then prepend the name with the PCI slot identifier.

With this change, we can drop Names struct, and each naming logic
becomes self-consistent.
src/udev/udev-builtin-net_id.c