diff options
author | Tom Gundersen <teg@jklm.no> | 2015-05-28 17:18:33 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-05-28 17:35:46 +0200 |
commit | 5f529f4c97a141457301477505ae7eb4c28cf610 (patch) | |
tree | a9c56318257d7c279dac4c681881db2bf3e8f499 | |
parent | c4e87748d5d3f574d335a87e3a6272276814b2fd (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.
-rw-r--r-- | src/libsystemd/sd-device/device-enumerator.c | 6 |
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 ce4862d7f0..3692d46e06 100644 --- a/src/libsystemd/sd-device/device-enumerator.c +++ b/src/libsystemd/sd-device/device-enumerator.c @@ -367,11 +367,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; @@ -389,7 +389,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) { |