summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libudev/libudev-device.c')
-rw-r--r--src/libudev/libudev-device.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 242a0d89b6..2604ad7051 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -2030,3 +2030,18 @@ struct udev_device *udev_device_new_from_nulstr(struct udev *udev, char *nulstr,
return device;
}
+
+int udev_device_copy_properties(struct udev_device *dst, struct udev_device *src) {
+ struct udev_list_entry *entry;
+
+ for ((entry = udev_device_get_properties_list_entry(src)); 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(dst, key, value);
+ }
+
+ return 0;
+}