summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-03-06 18:30:09 +0100
committerAnthony G. Basile <blueness@gentoo.org>2015-03-18 20:37:21 -0400
commit87a58f20434358efb217ca0583f7ebce2e1cc3b3 (patch)
treeebbd06343d625695bc1f49f63a837ba126a3ff9a /src/udev/udev-event.c
parentb8adef56d8e5ebe1b7d004b660e6a72392a79e02 (diff)
libudev: introduce udev_device_properties_copy()
To copy properties from one device to another. Drop the equivalent functionality from udevd. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 322ea65c40..eb53e0b1fd 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -837,18 +837,8 @@ void udev_event_execute_rules(struct udev_event *event,
}
if (major(udev_device_get_devnum(dev)) == 0 &&
- streq(udev_device_get_action(dev), "move")) {
- struct udev_list_entry *entry;
-
- for ((entry = udev_device_get_properties_list_entry(event->dev_db)); entry; entry = udev_list_entry_get_next(entry)) {
- const char *key, *value;
-
- key = udev_list_entry_get_name(entry);
- value = udev_list_entry_get_value(entry);
-
- udev_device_add_property(dev, key, value);
- }
- }
+ streq(udev_device_get_action(dev), "move"))
+ udev_device_copy_properties(dev, event->dev_db);
udev_rules_apply_to_event(rules, event,
timeout_usec, timeout_warn_usec,