]> sourceware.org Git - lvm2.git/commitdiff
Refactor and add code for (lv) 'lv_name' get function.
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 21 Oct 2010 14:49:10 +0000 (14:49 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Thu, 21 Oct 2010 14:49:10 +0000 (14:49 +0000)
lib/metadata/lv.c
lib/metadata/lv.h
lib/report/properties.c

index f379c3e4fdbda3a9347e62b7069b98d0c1060d84..bbaeb64554ae4d0d40af819cb0e8f0b4bc534689 100644 (file)
 #include "segtype.h"
 #include "str_list.h"
 
+char *lv_name_dup(struct dm_pool *mem, const struct logical_volume *lv)
+{
+       return dm_pool_strdup(mem, lv->name);
+}
+
 char *lv_modules_dup(struct dm_pool *mem, const struct logical_volume *lv)
 {
        struct dm_list *modules;
index 2f0ebeeb64c5a1611395b5949e6f007d1fba6338..f80d2d559a594f38fcd2fb40de12d348267935c3 100644 (file)
@@ -60,5 +60,6 @@ int lv_kernel_major(const struct logical_volume *lv);
 int lv_kernel_minor(const struct logical_volume *lv);
 char *lv_mirror_log_dup(struct dm_pool *mem, const struct logical_volume *lv);
 char *lv_modules_dup(struct dm_pool *mem, const struct logical_volume *lv);
+char *lv_name_dup(struct dm_pool *mem, const struct logical_volume *lv);
 
 #endif
index ce1d2f7a3ea00dee714caff3669459949f460059..8228193fc6f0d6d6aa99087efc00983893242f37 100644 (file)
@@ -99,7 +99,7 @@ GET_PV_NUM_PROPERTY_FN(pv_mda_used_count, pv_mda_used_count(pv))
 /* LV */
 GET_LV_STR_PROPERTY_FN(lv_uuid, lv_uuid_dup(lv))
 #define _lv_uuid_set _not_implemented_set
-#define _lv_name_get _not_implemented_get
+GET_LV_STR_PROPERTY_FN(lv_name, lv_name_dup(lv->vg->vgmem, lv))
 #define _lv_name_set _not_implemented_set
 GET_LV_STR_PROPERTY_FN(lv_path, lv_path_dup(lv->vg->vgmem, lv))
 #define _lv_path_set _not_implemented_set
This page took 0.044852 seconds and 5 git commands to generate.