udev-builtin-net_id: introduce get_first_syspath_component() helper function
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 9 Aug 2023 21:57:43 +0000 (06:57 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 10 Aug 2023 11:09:11 +0000 (20:09 +0900)
commitce8ff47f748c1593e0eb54a4e87600db39bd1d2d
treefd2a237abbabece3cd9ca3ce07260d75ea16dc38
parent5dc06b376fe8b7b117ac22d1e5298126e1e7ce12
udev-builtin-net_id: introduce get_first_syspath_component() helper function

Obtaining a component from syspath is a common pattern. Let's split out
the pattern. No functional change, just refactoring.
src/udev/udev-builtin-net_id.c