summaryrefslogtreecommitdiffstats
path: root/libdm/datastruct
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2001-11-14 18:38:07 +0000
committerAlasdair Kergon <agk@redhat.com>2001-11-14 18:38:07 +0000
commit9b7742bb36f04ff8a43854b3d56434de2bf9eaa3 (patch)
tree181d53ffa1d8dadf2adda84e4cff5bd11ca40a60 /libdm/datastruct
parent6e74833c6c53fffad2e68dfb5af491570f7650eb (diff)
downloadlvm2-9b7742bb36f04ff8a43854b3d56434de2bf9eaa3.tar.gz
lvm2-9b7742bb36f04ff8a43854b3d56434de2bf9eaa3.tar.xz
lvm2-9b7742bb36f04ff8a43854b3d56434de2bf9eaa3.zip
More LV-related tidying. lvdisplay without args now shows all LVs.
Diffstat (limited to 'libdm/datastruct')
-rw-r--r--libdm/datastruct/list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdm/datastruct/list.h b/libdm/datastruct/list.h
index 8fbe1aef..ef7e8028 100644
--- a/libdm/datastruct/list.h
+++ b/libdm/datastruct/list.h
@@ -52,4 +52,8 @@ static inline int list_empty(struct list *head) {
#define list_item(v, t) \
((t *)((char *)(v) - (unsigned int) &((t *) 0)->list))
+/* Given a known element in a known structure, locate the struct list */
+#define list_head(v, t, e) \
+ (((t *)((char *)(v) - (unsigned int) &((t *) 0)->e))->list)
+
#endif