list->prev = list;
}
-static int list_is_empty(struct udev_list_node *list)
+static int udev_list_is_empty(struct udev_list_node *list)
{
return list->next == list;
}
-static void list_node_insert_between(struct udev_list_node *new,
+static void udev_list_node_insert_between(struct udev_list_node *new,
struct udev_list_node *prev,
struct udev_list_node *next)
{
prev->next = new;
}
-static void list_node_remove(struct udev_list_node *entry)
+static void udev_list_node_remove(struct udev_list_node *entry)
{
struct udev_list_node *prev = entry->prev;
struct udev_list_node *next = entry->next;
static void list_entry_append(struct udev_list_entry *new, struct udev_list_node *list)
{
/* inserting before the list head make the node the last node in the list */
- list_node_insert_between(&new->node, list->prev, list);
+ udev_list_node_insert_between(&new->node, list->prev, list);
new->list = list;
}
/* insert entry into a list, before a given existing entry */
static void list_entry_insert_before(struct udev_list_entry *new, struct udev_list_entry *entry)
{
- list_node_insert_between(&new->node, entry->node.prev, &entry->node);
+ udev_list_node_insert_between(&new->node, entry->node.prev, &entry->node);
new->list = entry->list;
}
void udev_list_entry_remove(struct udev_list_entry *entry)
{
- list_node_remove(&entry->node);
+ udev_list_node_remove(&entry->node);
free(entry->name);
free(entry->value);
free(entry);
void udev_list_entry_move_to_end(struct udev_list_entry *list_entry)
{
- list_node_remove(&list_entry->node);
- list_node_insert_between(&list_entry->node, list_entry->list->prev, list_entry->list);
-}
-
-void udev_list_entry_move_to_list(struct udev_list_entry *list_entry, struct udev_list_node *list)
-{
- list_node_remove(&list_entry->node);
- list_node_insert_between(&list_entry->node, list->prev, list);
- list_entry->list = list;
+ udev_list_node_remove(&list_entry->node);
+ udev_list_node_insert_between(&list_entry->node, list_entry->list->prev, list_entry->list);
}
void udev_list_entry_move_before(struct udev_list_entry *list_entry, struct udev_list_entry *entry)
{
- list_node_remove(&list_entry->node);
- list_node_insert_between(&list_entry->node, entry->node.prev, &entry->node);
+ udev_list_node_remove(&list_entry->node);
+ udev_list_node_insert_between(&list_entry->node, entry->node.prev, &entry->node);
list_entry->list = entry->list;
}
struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list)
{
- if (list_is_empty(list))
+ if (udev_list_is_empty(list))
return NULL;
return list_node_to_entry(list->next);
}