chiark / gitweb /
libudev: add missing hunks
authorTom Gundersen <teg@jklm.no>
Thu, 5 Mar 2015 17:08:50 +0000 (18:08 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 9 Mar 2015 22:36:27 +0000 (23:36 +0100)
This should have been committed with
  udev_device_add_property - implicitly mark properties for saving to db

src/udev/udev-builtin.c
src/udev/udev-event.c
src/udev/udev-rules.c

index d2aec1b..fabc653 100644 (file)
@@ -123,12 +123,7 @@ int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const c
 }
 
 int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val) {
-        struct udev_list_entry *entry;
-
-        entry = udev_device_add_property(dev, key, val);
-        /* store in db, skip private keys */
-        if (key[0] != '.')
-                udev_list_entry_set_num(entry, true);
+        udev_device_add_property(dev, key, val);
 
         if (test)
                 printf("%s=%s\n", key, val);
index 7d0d98c..67fb1f7 100644 (file)
@@ -824,13 +824,11 @@ void udev_event_execute_rules(struct udev_event *event,
 
                         for ((entry = udev_device_get_properties_list_entry(event->dev_db)); entry; entry = udev_list_entry_get_next(entry)) {
                                 const char *key, *value;
-                                struct udev_list_entry *property;
 
                                 key = udev_list_entry_get_name(entry);
                                 value = udev_list_entry_get_value(entry);
 
-                                property = udev_device_add_property(dev, key, value);
-                                udev_list_entry_set_num(property, true);
+                                udev_device_add_property(dev, key, value);
                         }
                 }
 
index 2420913..e8387d7 100644 (file)
@@ -555,7 +555,6 @@ static int import_property_from_string(struct udev_device *dev, char *line) {
         char *key;
         char *val;
         size_t len;
-        struct udev_list_entry *entry;
 
         /* find key */
         key = line;