Skip to contentSkip to conversation

master - libdm: add DM_LIST_HEAD_INIT macro

PATCH Zdenek Kabelac 1 participant 1 message Oct 24, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=482e572e5de327ce3b8786215cf33e6d6223c543
Commit:        482e572e5de327ce3b8786215cf33e6d6223c543
Parent:        a98ea95c4da5afffbacd32c519734e7daef98ea9
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Oct 22 14:30:19 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Oct 24 16:39:31 2014 +0200

libdm: add DM_LIST_HEAD_INIT macro

Support to initialize dm_list struct members.

---
 WHATS_NEW_DM         |    1 +
 libdm/libdevmapper.h |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
WHATS_NEW_DM +1 -0
index d60b35f..5ab34c1 100644
@@ -1,5 +1,6 @@
 Version 1.02.91 - 
 ====================================
+  Add DM_LIST_HEAD_INIT macro to libdevmapper.h
   Fix dm_is_dm_major to not issue error about missing /proc lines for dm module.
 
 Version 1.02.90 - 1st September 2014
libdm/libdevmapper.h +2 -1
index 31574af..76c4eee 100644
@@ -1200,7 +1200,8 @@ struct dm_str_list {
  * Initialise a list before use.
  * The list head's next and previous pointers point back to itself.
  */
-#define DM_LIST_INIT(name)	struct dm_list name = { &(name), &(name) }
+#define DM_LIST_HEAD_INIT(name)	 { &(name), &(name) }
+#define DM_LIST_INIT(name)	struct dm_list name = DM_LIST_HEAD_INIT(name)
 void dm_list_init(struct dm_list *head);
 
 /*