diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2010-09-30 14:07:47 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2010-09-30 14:07:47 +0000 |
commit | 254d672dccd5c5e8da389f231564701a8ddedde7 (patch) | |
tree | 5bbd4457795e7f935a9e4e82873877c8f5f15b00 /lib/metadata/pv.c | |
parent | f4fd41552d79eb7a681c687b1d00872300c5c29e (diff) | |
download | lvm2-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/pv.c')
-rw-r--r-- | lib/metadata/pv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/metadata/pv.c b/lib/metadata/pv.c index a21b7d67..c60d825b 100644 --- a/lib/metadata/pv.c +++ b/lib/metadata/pv.c @@ -29,6 +29,11 @@ struct id pv_id(const struct physical_volume *pv) return pv_field(pv, id); } +char *pv_uuid_dup(const struct physical_volume *pv) +{ + return id_format_and_copy(pv->vg->vgmem, &pv->id); +} + const struct format_type *pv_format_type(const struct physical_volume *pv) { return pv_field(pv, fmt); |