master - lv: add 'mem' arg for lv_uuid_dup
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0e3042f488dd22b99b4ac0705a18bb03ee48a4d3 Commit: 0e3042f488dd22b99b4ac0705a18bb03ee48a4d3 Parent: f644431346465389bf1aaab0e9880cf0b1751c5a Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Sep 21 12:23:03 2015 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Sep 21 12:25:31 2015 +0200
lv: add 'mem' arg for lv_uuid_dup
--- lib/metadata/lv.c | 4 ++-- lib/metadata/lv.h | 2 +- lib/report/properties.c | 2 +- liblvm/lvm_lv.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
lib/metadata/lv.c +2 -2
@@ -479,9 +479,9 @@ char *lv_dmpath_dup(struct dm_pool *mem, const struct logical_volume *lv)return repstr; } -char *lv_uuid_dup (const struct logical_volume *lv) +char *lv_uuid_dup (struct dm_pool *mem,const struct logical_volume *lv) { -return id_format_and_copy (lv->vg->vgmem, &lv->lvid.id[1 ]); +return id_format_and_copy (mem ? mem : lv->vg->vgmem, &lv->lvid.id[1 ]); }char *lv_tags_dup (const struct logical_volume *lv)
lib/metadata/lv.h +1 -1
@@ -62,7 +62,7 @@ uint64_t lv_size(const struct logical_volume *lv);uint64_t lv_metadata_size (const struct logical_volume *lv);char *lv_attr_dup_with_info_and_seg_status (struct dm_pool *mem,const struct lv_with_info_and_seg_status *lvdm);char *lv_attr_dup (struct dm_pool *mem,const struct logical_volume *lv); -char *lv_uuid_dup (const struct logical_volume *lv); +char *lv_uuid_dup (struct dm_pool *mem,const struct logical_volume *lv);char *lv_tags_dup (const struct logical_volume *lv);char *lv_path_dup (struct dm_pool *mem,const struct logical_volume *lv);char *lv_dmpath_dup (struct dm_pool *mem,const struct logical_volume *lv);
lib/report/properties.c +1 -1
@@ -264,7 +264,7 @@ GET_PV_NUM_PROPERTY_FN(pv_ba_size, SECTOR_SIZE * pv->ba_size)#define _cache_write_misses_get prop_not_implemented_get/* LV */ -GET_LV_STR_PROPERTY_FN(lv_uuid, lv_uuid_dup(lv)) +GET_LV_STR_PROPERTY_FN(lv_uuid, lv_uuid_dup(lv->vg->vgmem, lv))#define _lv_uuid_set prop_not_implemented_set GET_LV_STR_PROPERTY_FN(lv_name, lv_name_dup(lv->vg->vgmem, lv))#define _lv_name_set prop_not_implemented_set
liblvm/lvm_lv.c +1 -1
@@ -56,7 +56,7 @@ const char *lvm_lv_get_uuid(const lv_t lv) {const char *rc;struct saved_env e =store_user_env (lv->vg->cmd); - rc =lv_uuid_dup (lv); + rc =lv_uuid_dup (lv->vg->vgmem, lv);restore_user_env (&e);return rc; }