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);
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);
}
/**
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);
}
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;
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);
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);
}
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);
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);
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);
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);
}
}
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);
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,
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,