udev-builtin-net_id: split out get_dev_port() and make its failure critical
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 22 Sep 2022 06:53:35 +0000 (15:53 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Aug 2023 01:56:26 +0000 (10:56 +0900)
commit4d756471d96801c66f0603c01e42ab033137cee6
tree08ed6e69ec7c4e28cfcc3fa4ffad7ce46cb6d7f6
parentf1e3eaa730190a60fdb780be26ee331b8c811e34
udev-builtin-net_id: split out get_dev_port() and make its failure critical

As dev_port and dev_id sysfs attributes are fundamental properties for
network interfaces. Hence, it should not fail.

Also, the type of dev_port is changed to unsigned. The kernel internally
uses 'unsigned short' for dev_port and dev_id. Hence, unsigned (that is,
32 bits) is still overkill, but should be enough.
src/udev/udev-builtin-net_id.c