]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-rules: make import_file_into_properties() take sd_device
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 29 Oct 2018 06:26:39 +0000 (15:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Nov 2018 04:35:03 +0000 (13:35 +0900)
src/udev/udev-rules.c

index 5c046ea838f25c7ade7b0f0b1a5441162cd96870..43e80c727862dcb19254df655c59e84509ae8afe 100644 (file)
@@ -615,7 +615,7 @@ static int import_property_from_string(sd_device *dev, char *line) {
         return device_add_property(dev, key, val);
 }
 
-static int import_file_into_properties(struct udev_device *dev, const char *filename) {
+static int import_file_into_properties(sd_device *dev, const char *filename) {
         _cleanup_fclose_ FILE *f = NULL;
         int r;
 
@@ -632,7 +632,7 @@ static int import_file_into_properties(struct udev_device *dev, const char *file
                 if (r == 0)
                         break;
 
-                (void) import_property_from_string(dev->device, line);
+                (void) import_property_from_string(dev, line);
         }
 
         return 0;
@@ -1975,7 +1975,7 @@ int udev_rules_apply_to_event(
                         char import[UTIL_PATH_SIZE];
 
                         udev_event_apply_format(event, rules_str(rules, cur->key.value_off), import, sizeof(import), false);
-                        if (import_file_into_properties(event->dev, import) != 0)
+                        if (import_file_into_properties(event->dev->device, import) != 0)
                                 if (cur->key.op != OP_NOMATCH)
                                         goto nomatch;
                         break;