]> err.no Git - systemd/commitdiff
libudev: list - prepend udev_* to all functions
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 16 Oct 2008 23:39:10 +0000 (01:39 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 16 Oct 2008 23:39:10 +0000 (01:39 +0200)
udev/lib/libudev-list.c
udev/lib/libudev-private.h

index fb8301b0bd933953776c787b7e5f383e7e9f4851..76c2f7e93bd1847ded8fb4eb3250b02cd656b063 100644 (file)
@@ -43,12 +43,12 @@ void udev_list_init(struct udev_list_node *list)
        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)
 {
@@ -58,7 +58,7 @@ static void list_node_insert_between(struct udev_list_node *new,
        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;
@@ -84,14 +84,14 @@ static struct udev_list_entry *list_node_to_entry(struct udev_list_node *node)
 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;
 }
 
@@ -154,7 +154,7 @@ struct udev_list_entry *udev_list_entry_add(struct udev *udev, struct udev_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);
@@ -171,27 +171,20 @@ void udev_list_cleanup(struct udev *udev, struct udev_list_node *list)
 
 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);
 }
index 96e62a8ec5263c2dcccf002a968dfa62a35d0c2e..f2814c4ad6698476dc00c7d4eb9cacfb09159bb0 100644 (file)
@@ -130,7 +130,6 @@ extern struct udev_list_entry *udev_list_entry_add(struct udev *udev, struct ude
 extern void udev_list_entry_remove(struct udev_list_entry *entry);
 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_to_list(struct udev_list_entry *list_entry, struct udev_list_node *list);
 extern void udev_list_entry_move_before(struct udev_list_entry *list_entry, struct udev_list_entry *entry);
 extern int udev_list_entry_get_flag(struct udev_list_entry *list_entry);
 extern void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag);