diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-16 21:12:08 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-16 21:12:08 +0200 |
commit | be7f7f57012e61b062bd540152a1af529c1509f2 (patch) | |
tree | 3a92ff202e12a3bfe89fa43cee5a8e505adbfd62 /udev/lib | |
parent | a390e6f764087b74b1567e1daf1f1c41eae42c74 (diff) |
fix sorting of rules files
Diffstat (limited to 'udev/lib')
-rw-r--r-- | udev/lib/libudev-list.c | 9 | ||||
-rw-r--r-- | udev/lib/libudev-private.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/udev/lib/libudev-list.c b/udev/lib/libudev-list.c index 918277cb64..fb8301b0bd 100644 --- a/udev/lib/libudev-list.c +++ b/udev/lib/libudev-list.c @@ -148,7 +148,7 @@ struct udev_list_entry *udev_list_entry_add(struct udev *udev, struct udev_list_ list_entry_insert_before(entry_new, entry_loop); else list_entry_append(entry_new, list); - info(udev, "'%s=%s' added\n", entry_new->name, entry_new->value); + dbg(udev, "'%s=%s' added\n", entry_new->name, entry_new->value); return entry_new; } @@ -182,6 +182,13 @@ void udev_list_entry_move_to_list(struct udev_list_entry *list_entry, struct ude list_entry->list = 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); + list_entry->list = entry->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 6549669711..96e62a8ec5 100644 --- a/udev/lib/libudev-private.h +++ b/udev/lib/libudev-private.h @@ -131,6 +131,7 @@ 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); #define udev_list_entry_foreach_safe(entry, tmp, first) \ |