From 9dcf7ec8a0411aeb432eee20035e6c0f385ae7fe Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 17 Oct 2008 18:59:08 +0200 Subject: libudev: make list_node functions available --- udev/lib/libudev-list.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'udev/lib/libudev-list.c') diff --git a/udev/lib/libudev-list.c b/udev/lib/libudev-list.c index 76c2f7e93b..606e3d5d63 100644 --- a/udev/lib/libudev-list.c +++ b/udev/lib/libudev-list.c @@ -43,14 +43,14 @@ void udev_list_init(struct udev_list_node *list) list->prev = list; } -static int udev_list_is_empty(struct udev_list_node *list) +int udev_list_is_empty(struct udev_list_node *list) { return list->next == list; } static void udev_list_node_insert_between(struct udev_list_node *new, - struct udev_list_node *prev, - struct udev_list_node *next) + struct udev_list_node *prev, + struct udev_list_node *next) { next->prev = new; new->next = next; @@ -58,7 +58,12 @@ static void udev_list_node_insert_between(struct udev_list_node *new, prev->next = new; } -static void udev_list_node_remove(struct udev_list_node *entry) +void udev_list_node_append(struct udev_list_node *new, struct udev_list_node *list) +{ + udev_list_node_insert_between(new, list->prev, list); +} + +void udev_list_node_remove(struct udev_list_node *entry) { struct udev_list_node *prev = entry->prev; struct udev_list_node *next = entry->next; -- cgit v1.2.3-54-g00ecf