]> err.no Git - systemd/commitdiff
udev_list_cleanup() -> udev_list_cleanup_entries()
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 18 Oct 2008 17:27:38 +0000 (19:27 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 18 Oct 2008 17:27:38 +0000 (19:27 +0200)
udev/lib/libudev-device.c
udev/lib/libudev-enumerate.c
udev/lib/libudev-list.c
udev/lib/libudev-private.h
udev/lib/libudev-queue.c
udev/lib/libudev.c
udev/udev-event.c
udev/udev-node.c
udev/udev-rules.c

index b5d42354e548d31c33f4304f6e35ef6049d362dd..c030eb058578851682fdbf4356e7db534d5ed167 100644 (file)
@@ -604,13 +604,13 @@ void udev_device_unref(struct udev_device *udev_device)
        free(udev_device->sysname);
        free(udev_device->devnode);
        free(udev_device->subsystem);
-       udev_list_cleanup(udev_device->udev, &udev_device->devlinks_list);
-       udev_list_cleanup(udev_device->udev, &udev_device->properties_list);
+       udev_list_cleanup_entries(udev_device->udev, &udev_device->devlinks_list);
+       udev_list_cleanup_entries(udev_device->udev, &udev_device->properties_list);
        free(udev_device->action);
        free(udev_device->driver);
        free(udev_device->devpath_old);
        free(udev_device->physdevpath);
-       udev_list_cleanup(udev_device->udev, &udev_device->attr_list);
+       udev_list_cleanup_entries(udev_device->udev, &udev_device->attr_list);
        for (i = 0; i < ARRAY_SIZE(udev_device->envp) && udev_device->envp[i] != NULL; i++)
                free(udev_device->envp[i]);
        info(udev_device->udev, "udev_device: %p released\n", udev_device);
@@ -747,7 +747,7 @@ struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *
 void udev_device_cleanup_devlinks_list(struct udev_device *udev_device)
 {
        udev_device->devlinks_uptodate = 0;
-       udev_list_cleanup(udev_device->udev, &udev_device->devlinks_list);
+       udev_list_cleanup_entries(udev_device->udev, &udev_device->devlinks_list);
 }
 
 /**
index fab9c4d88df7259977d74fa17146cd5963c48918..7a8c51c0785f86ba1dc2ba53acf508f5c08d3710 100644 (file)
@@ -82,11 +82,11 @@ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
        udev_enumerate->refcount--;
        if (udev_enumerate->refcount > 0)
                return;
-       udev_list_cleanup(udev_enumerate->udev, &udev_enumerate->devices_list);
-       udev_list_cleanup(udev_enumerate->udev, &udev_enumerate->attr_match_list);
-       udev_list_cleanup(udev_enumerate->udev, &udev_enumerate->attr_nomatch_list);
-       udev_list_cleanup(udev_enumerate->udev, &udev_enumerate->subsystem_match_list);
-       udev_list_cleanup(udev_enumerate->udev, &udev_enumerate->subsystem_nomatch_list);
+       udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list);
+       udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->attr_match_list);
+       udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->attr_nomatch_list);
+       udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->subsystem_match_list);
+       udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->subsystem_nomatch_list);
        free(udev_enumerate);
 }
 
index 606e3d5d630833c5b9e20b2e91ded0fcdcde5443..f205c61a7068b2b5ec308779d432b2f0329bf495 100644 (file)
@@ -165,7 +165,7 @@ void udev_list_entry_remove(struct udev_list_entry *entry)
        free(entry);
 }
 
-void udev_list_cleanup(struct udev *udev, struct udev_list_node *list)
+void udev_list_cleanup_entries(struct udev *udev, struct udev_list_node *list)
 {
        struct udev_list_entry *entry_loop;
        struct udev_list_entry *entry_tmp;
index 07f14917732c89c7288b10b92bf97da178806e50..0dda4c3b5ee43ae09b697f04e4d8bbaf94fec392 100644 (file)
@@ -139,7 +139,7 @@ extern struct udev_list_entry *udev_list_entry_add(struct udev *udev, struct ude
                                                   const char *name, const char *value,
                                                   int unique, int sort);
 extern void udev_list_entry_remove(struct udev_list_entry *entry);
-extern void udev_list_cleanup(struct udev *udev, struct udev_list_node *name_list);
+extern void udev_list_cleanup_entries(struct udev *udev, struct udev_list_node *name_list);
 extern struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list);
 extern void udev_list_entry_move_to_end(struct udev_list_entry *list_entry);
 extern void udev_list_entry_move_before(struct udev_list_entry *list_entry, struct udev_list_entry *entry);
index 60f7209d7678dfb8c9a26cda22b6ac3bcd91e298..f1c69fdb93e1bcec2d02ccba841f197259a349a9 100644 (file)
@@ -71,8 +71,8 @@ void udev_queue_unref(struct udev_queue *udev_queue)
        udev_queue->refcount--;
        if (udev_queue->refcount > 0)
                return;
-       udev_list_cleanup(udev_queue->udev, &udev_queue->queue_list);
-       udev_list_cleanup(udev_queue->udev, &udev_queue->failed_list);
+       udev_list_cleanup_entries(udev_queue->udev, &udev_queue->queue_list);
+       udev_list_cleanup_entries(udev_queue->udev, &udev_queue->failed_list);
        free(udev_queue);
 }
 
@@ -192,7 +192,7 @@ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev
 
        if (udev_queue == NULL)
                return NULL;
-       udev_list_cleanup(udev_queue->udev, &udev_queue->queue_list);
+       udev_list_cleanup_entries(udev_queue->udev, &udev_queue->queue_list);
        util_strlcpy(path, udev_get_dev_path(udev_queue->udev), sizeof(path));
        util_strlcat(path, "/.udev/queue", sizeof(path));
        dir = opendir(path);
@@ -230,7 +230,7 @@ struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev
 
        if (udev_queue == NULL)
                return NULL;
-       udev_list_cleanup(udev_queue->udev, &udev_queue->failed_list);
+       udev_list_cleanup_entries(udev_queue->udev, &udev_queue->failed_list);
        util_strlcpy(path, udev_get_dev_path(udev_queue->udev), sizeof(path));
        util_strlcat(path, "/.udev/failed", sizeof(path));
        dir = opendir(path);
index 511054a01afafebf51d49fab5d8bbc68020923dd..a09aa051b3a369139e7899618d40f73b7f95a931 100644 (file)
@@ -278,7 +278,7 @@ void udev_unref(struct udev *udev)
        udev->refcount--;
        if (udev->refcount > 0)
                return;
-       udev_list_cleanup(udev, &udev->properties_list);
+       udev_list_cleanup_entries(udev, &udev->properties_list);
        free(udev->dev_path);
        free(udev->sys_path);
        free(udev->rules_path);
index 59ae7c5378633195ad5c89641b7aab63156ab955..86cb92ea949f66cf8fe9239863f25f7da284b36f 100644 (file)
@@ -52,7 +52,7 @@ struct udev_event *udev_event_new(struct udev_device *dev)
 
 void udev_event_unref(struct udev_event *event)
 {
-       udev_list_cleanup(event->udev, &event->run_list);
+       udev_list_cleanup_entries(event->udev, &event->run_list);
        dbg(event->udev, "free event %p\n", event);
        free(event);
 }
index 62786d417b6f6fff5d09000f481a132bdfa1416d..c384eb7764771eb04a3874e9f9caac395927fc2a 100644 (file)
@@ -338,7 +338,7 @@ static int update_link(struct udev_device *dev, const char *slink, int test)
                }
                udev_device_unref(dev_db);
        }
-       udev_list_cleanup(udev, &dev_list);
+       udev_list_cleanup_entries(udev, &dev_list);
 
        if (target[0] == '\0') {
                info(udev, "no current target for '%s' found\n", slink);
index a9793f4e8df40ca641258de30fcc3bd160c8592a..ff61574ac6af274be6dce29174b80ca0f276bdba 100644 (file)
@@ -970,7 +970,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udev_event *event)
                                        event->run_final = 1;
                                if (rule->run.operation == KEY_OP_ASSIGN || rule->run.operation == KEY_OP_ASSIGN_FINAL) {
                                        info(event->udev, "reset run list\n");
-                                       udev_list_cleanup(event->udev, &event->run_list);
+                                       udev_list_cleanup_entries(event->udev, &event->run_list);
                                }
                                dbg(event->udev, "add run '%s'\n", key_val(rule, &rule->run));
                                list_entry = udev_list_entry_add(event->udev, &event->run_list,
@@ -1050,7 +1050,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udev_event *event)
                                if (rule->run.operation == KEY_OP_ASSIGN ||
                                    rule->run.operation == KEY_OP_ASSIGN_FINAL) {
                                        info(event->udev, "reset run list\n");
-                                       udev_list_cleanup(event->udev, &event->run_list);
+                                       udev_list_cleanup_entries(event->udev, &event->run_list);
                                }
                                dbg(event->udev, "add run '%s'\n", key_val(rule, &rule->run));
                                list_entry = udev_list_entry_add(event->udev, &event->run_list,