1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Add list_move() support function for list manipulation.

This commit is contained in:
Dave Wysochanski 2008-03-26 16:20:54 +00:00
parent 293db73c76
commit 43aa463780
3 changed files with 22 additions and 1 deletions

View File

@ -1,6 +1,7 @@
Version 2.02.34 -
===================================
Add 'is_reserved_lvname()' helper function.
Add list_move() for moving elements from one list to another.
Add 'is_reserved_lvname()' for identifying hidden LVs.
Correct command name in lvmdiskscan man page.
clvmd no longer crashes if it sees nodeids over 50.
Fix potential deadlock in clvmd thread handling.

View File

@ -54,6 +54,16 @@ void list_add_h(struct list *head, struct list *elem);
*/
void list_del(struct list *elem);
/*
* Move an element from an existing list to list 'head'.
* Insert the element before 'head'.
*/
static inline void list_move(struct list *item, struct list *head)
{
list_del(item);
list_add(head, item);
}
/*
* Is the list empty?
*/

View File

@ -54,6 +54,16 @@ void list_add_h(struct list *head, struct list *elem);
*/
void list_del(struct list *elem);
/*
* Move an element from an existing list to list 'head'.
* Insert the element before 'head'.
*/
static inline void list_move(struct list *item, struct list *head)
{
list_del(item);
list_add(head, item);
}
/*
* Is the list empty?
*/