diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-23 23:37:24 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-23 23:37:24 +0000 |
commit | 357ed599ec4b3a6000cecb305192d453b92c86c7 (patch) | |
tree | 2aaa1c7fccfaf5e591d2c56f598c43fa817d7d98 | |
parent | 5f055102fa9aabdfb3105b8ac10364144c963a84 (diff) | |
download | lvm2-357ed599ec4b3a6000cecb305192d453b92c86c7.tar.gz lvm2-357ed599ec4b3a6000cecb305192d453b92c86c7.tar.xz lvm2-357ed599ec4b3a6000cecb305192d453b92c86c7.zip |
Add list structure definitions for liblvm objects.
- pv_t, vg_t, lv_t
- include libdevmapper.h: needed for struct dm_list
These list structures will be needed in later APIs to return a list of
handles to one object, given another object. For example, lvm_vg_list_lvs()
will return a list of LV handles (lv_t's) given a VG handle (vg_t). We
need a structure to do this so we define the LV structure, as well as the
other structures at this point.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
-rw-r--r-- | liblvm/lvm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/liblvm/lvm.h b/liblvm/lvm.h index bf765b54..5df80d68 100644 --- a/liblvm/lvm.h +++ b/liblvm/lvm.h @@ -15,6 +15,7 @@ #define _LIB_LVM_H #include "lvm-version.h" +#include "libdevmapper.h" #include <stdint.h> @@ -28,6 +29,22 @@ typedef struct volume_group vg_t; typedef struct physical_volume pv_t; typedef struct logical_volume lv_t; +typedef struct lvm_vg_list { + struct dm_list list; + vg_t *vg; +} vg_list_t; + +typedef struct lvm_pv_list { + struct dm_list list; + pv_t *pv; +} pv_list_t; + +typedef struct lvm_lv_list { + struct dm_list list; + lv_t *lv; +} lv_list_t; + + struct lvm; /* internal data */ /** |