summaryrefslogtreecommitdiffstats
path: root/lib/metadata/vg.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2010-09-30 14:07:47 +0000
committerDave Wysochanski <dwysocha@redhat.com>2010-09-30 14:07:47 +0000
commit254d672dccd5c5e8da389f231564701a8ddedde7 (patch)
tree5bbd4457795e7f935a9e4e82873877c8f5f15b00 /lib/metadata/vg.c
parentf4fd41552d79eb7a681c687b1d00872300c5c29e (diff)
downloadlvm2-254d672dccd5c5e8da389f231564701a8ddedde7.tar.gz
lvm2-254d672dccd5c5e8da389f231564701a8ddedde7.tar.xz
lvm2-254d672dccd5c5e8da389f231564701a8ddedde7.zip
Add pv_uuid_dup, vg_uuid_dup, and lv_uuid_dup, and call id_format_and_copy.
Add supporting functions for pv_uuid, vg_uuid, and lv_uuid. Call new function id_format_and_copy. Use 'const' where appropriate. Add "_dup" suffix to indicate memory is being allocated. Call {pv|vg|lv}_uuid_dup from lvm2app uuid functions.
Diffstat (limited to 'lib/metadata/vg.c')
-rw-r--r--lib/metadata/vg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/metadata/vg.c b/lib/metadata/vg.c
index 07cb60ab..c82eaa41 100644
--- a/lib/metadata/vg.c
+++ b/lib/metadata/vg.c
@@ -16,6 +16,11 @@
#include "metadata.h"
#include "activate.h"
+char *vg_uuid_dup(const struct volume_group *vg)
+{
+ return id_format_and_copy(vg->vgmem, &vg->id);
+}
+
uint32_t vg_seqno(const struct volume_group *vg)
{
return vg->seqno;