udev-builtin-net_id: split-out pci_get_onboard_index() from dev_pci_onboard()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 31 Jul 2023 19:18:52 +0000 (04:18 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Aug 2023 02:20:48 +0000 (11:20 +0900)
commitd6ec0fe22938aa6067b34d58739637405910c011
tree2fa7d2ee4f0fc828f8f4a33c25822d39a5990416
parent51524b82a28644d0a1574502ff5fed23c136edd6
udev-builtin-net_id: split-out pci_get_onboard_index() from dev_pci_onboard()

This also changes the onboard index type to unsigned, as it is at most
2^16 - 1. Hence, unsigned is enough.

Then, we can use device_get_sysattr_unsigned() helper function.

This also drops mostly redundant debugging logs. The index will be
logged later anyway.
src/udev/udev-builtin-net_id.c