]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-device: introduce sd_device_get_driver_subsystem()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Aug 2024 19:09:49 +0000 (04:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 27 Aug 2024 20:18:14 +0000 (05:18 +0900)
commit44bc6f3cabb2d26b432a91c09e1747c7a783dac9
treec8846817e1421d9f7d950683b16a5bc1ce7fd0be
parent55e35a4d59bea8653a428f544490b1d80b848d64
sd-device: introduce sd_device_get_driver_subsystem()

To create the sd_device object of a driver, the function
sd_device_new_from_subsystem_sysname() requires "drivers" for subsystem
and e.g. "pci:iwlwifi" for sysname. Similarly, sd_device_new_from_device_id()
also requires driver subsystem. However, we have never provided a
way to get the driver subsystem ("pci" for the previous example) from
an existing sd_device object.

Let's introduce a way to get driver subsystem.
man/rules/meson.build
man/sd_device_get_syspath.xml
src/libsystemd/libsystemd.sym
src/libsystemd/sd-device/sd-device.c
src/libsystemd/sd-device/test-sd-device.c
src/systemd/sd-device.h