diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-28 01:34:55 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-28 01:34:55 +0200 |
commit | 0de33a61d741699f41f47ebdb505f518722159b2 (patch) | |
tree | c49789c423a93087a7034505284d5c68e113ee34 /udev/lib/libudev-private.h | |
parent | e345e2670a8c17f5e1145cc554b7a7646e271032 (diff) |
libudev: more list rework
Diffstat (limited to 'udev/lib/libudev-private.h')
-rw-r--r-- | udev/lib/libudev-private.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h index 6abd7b7c20..162b33aef6 100644 --- a/udev/lib/libudev-private.h +++ b/udev/lib/libudev-private.h @@ -109,11 +109,18 @@ struct list_node { struct list_node *next, *prev; }; extern void list_init(struct list_node *list); -extern struct udev_list *list_insert_entry(struct udev *udev, struct list_node *name_list, - const char *name, const char *value, int sort); -extern struct udev_list *list_get_entry(struct list_node *list); -extern void list_move_entry_to_end(struct udev_list *list_entry, struct list_node *list); extern void list_cleanup(struct udev *udev, struct list_node *name_list); +extern struct udev_list_entry *list_entry_add(struct udev *udev, struct list_node *list, + const char *name, const char *value, + int unique, int sort); +extern void list_entry_remove(struct udev_list_entry *entry); +extern struct udev_list_entry *list_get_entry(struct list_node *list); +extern void list_entry_move_to_end(struct udev_list_entry *list_entry); +#define list_entry_foreach_safe(entry, tmp, first) \ + for (entry = first, \ + tmp = udev_list_entry_get_next(entry); \ + entry != NULL; \ + entry = tmp, tmp = udev_list_entry_get_next(tmp)) /* libudev-utils */ #define UTIL_PATH_SIZE 1024 |