diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-02-06 08:36:48 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-02-06 08:36:52 +0100 |
commit | 5ce41697bd3ddc19cd6e1e6834751082ca0c8b02 (patch) | |
tree | efd0d242287ee39775fd4e215f8ee74d4d82fbfa /src | |
parent | udevadm info: "-a" should enumerate sysfs attributes, not envs (#11642) (diff) | |
download | systemd-5ce41697bd3ddc19cd6e1e6834751082ca0c8b02.tar.xz systemd-5ce41697bd3ddc19cd6e1e6834751082ca0c8b02.zip |
sd-device: fix device_copy_properties()
This fixes a bug introduced by a3ce813697bcc1c4644e097a2f1cd0459326d6ee.
Fixes #11652.
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-device/device-private.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c index 2daf4ddd57..76267a1e74 100644 --- a/src/libsystemd/sd-device/device-private.c +++ b/src/libsystemd/sd-device/device-private.c @@ -712,13 +712,13 @@ int device_copy_properties(sd_device *device_dst, sd_device *device_src) { if (r < 0) return r; - ORDERED_HASHMAP_FOREACH_KEY(property, value, device_src->properties_db, i) { + ORDERED_HASHMAP_FOREACH_KEY(value, property, device_src->properties_db, i) { r = device_add_property_aux(device_dst, property, value, true); if (r < 0) return r; } - ORDERED_HASHMAP_FOREACH_KEY(property, value, device_src->properties, i) { + ORDERED_HASHMAP_FOREACH_KEY(value, property, device_src->properties, i) { r = device_add_property_aux(device_dst, property, value, false); if (r < 0) return r; |