diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-16 20:12:16 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-16 20:12:16 +0200 |
commit | daa849db6faf73fd712b6ff8fc63adcd7d82f178 (patch) | |
tree | b65ceb8cb11492d0d7badfdbbc1e8529fcb8aca3 /udev/lib | |
parent | 7db6580f42325bedf88c8e5b79956545e0b07eb6 (diff) |
udev-rules-parse: name_list -> udev_list
Diffstat (limited to 'udev/lib')
-rw-r--r-- | udev/lib/libudev-list.c | 9 | ||||
-rw-r--r-- | udev/lib/libudev-private.h | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/udev/lib/libudev-list.c b/udev/lib/libudev-list.c index ac57ee4ebf..918277cb64 100644 --- a/udev/lib/libudev-list.c +++ b/udev/lib/libudev-list.c @@ -165,7 +165,7 @@ void udev_list_cleanup(struct udev *udev, struct udev_list_node *list) struct udev_list_entry *entry_loop; struct udev_list_entry *entry_tmp; - list_entry_foreach_safe(entry_loop, entry_tmp, udev_list_get_entry(list)) + udev_list_entry_foreach_safe(entry_loop, entry_tmp, udev_list_get_entry(list)) udev_list_entry_remove(entry_loop); } @@ -175,6 +175,13 @@ void udev_list_entry_move_to_end(struct udev_list_entry *list_entry) 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; +} + struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list) { if (list_is_empty(list)) diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h index 040a48b0e3..6549669711 100644 --- a/udev/lib/libudev-private.h +++ b/udev/lib/libudev-private.h @@ -130,9 +130,10 @@ 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 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); -#define list_entry_foreach_safe(entry, tmp, first) \ +#define udev_list_entry_foreach_safe(entry, tmp, first) \ for (entry = first, \ tmp = udev_list_entry_get_next(entry); \ entry != NULL; \ |