summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-device/device-enumerator.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-05-28 17:18:33 +0200
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:01:12 +0100
commit94baadf758e64941cfef8376fdd1ea269354662a (patch)
tree6777fe37de8d5437bebd8382d8ead2b194091c07 /src/libsystemd/sd-device/device-enumerator.c
parent993e17947b005caa23636762683e0cf0afb2a600 (diff)
sd-device: enumerator - fix matching on properties and sysattrs
This was a regression that broke $ udevadm trigger -nv --property-match=DEVNAME=/dev/sda1 --attr-match=size=409600 Reported by David Reisner.
Diffstat (limited to 'src/libsystemd/sd-device/device-enumerator.c')
-rw-r--r--src/libsystemd/sd-device/device-enumerator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c
index 1d79aff8b..71f605c5f 100644
--- a/src/libsystemd/sd-device/device-enumerator.c
+++ b/src/libsystemd/sd-device/device-enumerator.c
@@ -374,11 +374,11 @@ static bool match_sysattr(sd_device_enumerator *enumerator, sd_device *device) {
assert(enumerator);
assert(device);
- HASHMAP_FOREACH_KEY(sysattr, value, enumerator->nomatch_sysattr, i)
+ HASHMAP_FOREACH_KEY(value, sysattr, enumerator->nomatch_sysattr, i)
if (match_sysattr_value(device, sysattr, value))
return false;
- HASHMAP_FOREACH_KEY(sysattr, value, enumerator->match_sysattr, i)
+ HASHMAP_FOREACH_KEY(value, sysattr, enumerator->match_sysattr, i)
if (!match_sysattr_value(device, sysattr, value))
return false;
@@ -396,7 +396,7 @@ static bool match_property(sd_device_enumerator *enumerator, sd_device *device)
if (hashmap_isempty(enumerator->match_property))
return true;
- HASHMAP_FOREACH_KEY(property, value, enumerator->match_property, i) {
+ HASHMAP_FOREACH_KEY(value, property, enumerator->match_property, i) {
const char *property_dev, *value_dev;
FOREACH_DEVICE_PROPERTY(device, property_dev, value_dev) {