chiark / gitweb /
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 b5d4235..c030eb0 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 fab9c4d..7a8c51c 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 606e3d5..f205c61 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 07f1491..0dda4c3 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 60f7209..f1c69fd 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 511054a..a09aa05 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 59ae7c5..86cb92e 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 62786d4..c384eb7 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 a9793f4..ff61574 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,