sd-device: allow to create sd-device object through a symlink outside of /sys
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 Aug 2022 16:54:47 +0000 (01:54 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 12 Aug 2022 12:41:12 +0000 (21:41 +0900)
commit95c250be0d35fccdcea2a04026dece28c047d3a4
treee47add2830c0def75163f85bb34db693a872aabc
parentedf6cbc30f60627fedaf88480ba03b6bbed9da99
sd-device: allow to create sd-device object through a symlink outside of /sys

For example, /proc/device-tree is a symlink to /sys/firmware/devicetree/base,
and the kernel documentation says the symlink should be used by userspace app.
See, https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw.
Hence, it is useful to make `sd_device_new_from_path()` support such symlink.
src/libsystemd/sd-device/sd-device.c