summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-06-22 15:29:43 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-06-22 15:35:58 +0200
commit0bce30f319d47c18cdc0aabf117ef9eee9fe1c0e (patch)
treecb443f975138a93f44a47cc6eff6e17a13705cf9
parentcfe39fef2617d6c67be6c0f599b4394406e3b5fc (diff)
downloadptxdist-0bce30f319d47c18cdc0aabf117ef9eee9fe1c0e.tar.gz
ptxdist-0bce30f319d47c18cdc0aabf117ef9eee9fe1c0e.tar.xz
systemd/udev: enumerator - fix matching on properties and sysattrs
Which causes dt-utils's barebox-state to fail on mtd backends. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--patches/systemd-220/0010-sd-device-enumerator-fix-matching-on-properties-and-.patch44
-rw-r--r--patches/systemd-220/series3
2 files changed, 46 insertions, 1 deletions
diff --git a/patches/systemd-220/0010-sd-device-enumerator-fix-matching-on-properties-and-.patch b/patches/systemd-220/0010-sd-device-enumerator-fix-matching-on-properties-and-.patch
new file mode 100644
index 000000000..c874ef3a0
--- /dev/null
+++ b/patches/systemd-220/0010-sd-device-enumerator-fix-matching-on-properties-and-.patch
@@ -0,0 +1,44 @@
+From: Tom Gundersen <teg@jklm.no>
+Date: Thu, 28 May 2015 17:18:33 +0200
+Subject: [PATCH] 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.
+
+(cherry picked from commit 5f529f4c97a141457301477505ae7eb4c28cf610)
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ src/libsystemd/sd-device/device-enumerator.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c
+index ce4862d7f0a3..3692d46e0619 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) {
diff --git a/patches/systemd-220/series b/patches/systemd-220/series
index 32cf35293..83314904b 100644
--- a/patches/systemd-220/series
+++ b/patches/systemd-220/series
@@ -9,4 +9,5 @@
0007-missing-add-more-btrfs-defines.patch
0008-missing-define-O_PATH-and-AT_EMPTY_PATH.patch
0009-sd-network-ignore-missing-directory-if-networkd-is-d.patch
-# ffc145bfa13923d36a62a2a3e80169d6 - git-ptx-patches magic
+0010-sd-device-enumerator-fix-matching-on-properties-and-.patch
+# db08a6feb9f5f821ab2125c4a3507dbd - git-ptx-patches magic