]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-device-enumerator,monitor: fix sysattr match
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 8 Aug 2022 13:03:35 +0000 (22:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 8 Aug 2022 16:17:00 +0000 (01:17 +0900)
commit585f2035b37a073dcea5c61e26ccb869b1c43578
treea4a47e5370b9bd425ead2782b1876482f038b9e4
parent52be2b43f530c69b058625d7b9e0a2184c5d3938
sd-device-enumerator,monitor: fix sysattr match

Previously, if sd_device_enumerator_add_match_sysattr() is called for
the same sysattr with different values, then no device passed the filter.

Now, the accepted values (or patterns) are stored in strv, and if the
sysattr value of a device matches with the strv, then the device passes
the filter.
src/libsystemd/sd-device/device-enumerator.c
src/libsystemd/sd-device/device-monitor.c
src/libsystemd/sd-device/device-util.c
src/libsystemd/sd-device/device-util.h