File fate-309425_display-dm-name-for-lv-name.patch of Package lvm2.13365

---
 lib/config/config_settings.h |    3 +++
 lib/config/defaults.h        |    1 +
 lib/display/display.c        |   13 +++++++++----
 3 files changed, 13 insertions(+), 4 deletions(-)

Index: LVM2.2.02.170/lib/config/config_settings.h
===================================================================
--- LVM2.2.02.170.orig/lib/config/config_settings.h
+++ LVM2.2.02.170/lib/config/config_settings.h
@@ -1039,6 +1039,9 @@ cfg(global_fsadm_executable_CFG, "fsadm_
 	"The full path to the fsadm command.\n"
 	"LVM uses this command to help with lvresize -r operations.\n")
 
+cfg(global_display_dm_name_for_lv_name_CFG, "display_dm_name_for_lv_name", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME, vsn(2, 2, 98), NULL, 0, NULL,
+	"Display dm name for lv name.\n")
+
 cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL, 0, NULL,
 	"The method LVM uses to set the local system ID.\n"
 	"Volume Groups can also be given a system ID (by vgcreate, vgchange,\n"
Index: LVM2.2.02.170/lib/config/defaults.h
===================================================================
--- LVM2.2.02.170.orig/lib/config/defaults.h
+++ LVM2.2.02.170/lib/config/defaults.h
@@ -33,6 +33,7 @@
 #define DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV 1
 #define DEFAULT_EXTERNAL_DEVICE_INFO_SOURCE "none"
 #define DEFAULT_SYSFS_SCAN 1
+#define DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME 0
 #define DEFAULT_MD_COMPONENT_DETECTION 1
 #define DEFAULT_FW_RAID_COMPONENT_DETECTION 0
 #define DEFAULT_MD_CHUNK_ALIGNMENT 1
Index: LVM2.2.02.170/lib/display/display.c
===================================================================
--- LVM2.2.02.170.orig/lib/display/display.c
+++ LVM2.2.02.170/lib/display/display.c
@@ -413,10 +413,15 @@ int lvdisplay_full(struct cmd_context *c
 			  lv->vg->cmd->dev_dir, lv->vg->name, lv->name);
 	else if (lv_is_visible(lv)) {
 		/* Thin pool does not have /dev/vg/name link */
-		if (!lv_is_thin_pool(lv))
-			log_print("LV Path                %s%s/%s",
-				  lv->vg->cmd->dev_dir,
-				  lv->vg->name, lv->name);
+		if (!lv_is_thin_pool(lv)) {
+			if (find_config_tree_bool(cmd, global_display_dm_name_for_lv_name_CFG, NULL)) {
+				log_print("LV Path                %smapper/%s-%s", lv->vg->cmd->dev_dir,
+					  lv->vg->name, lv->name);
+			} else {
+				log_print("LV Path                %s%s/%s", lv->vg->cmd->dev_dir,
+					  lv->vg->name, lv->name);
+			}
+		}
 		log_print("LV Name                %s", lv->name);
 	} else
 		log_print("Internal LV Name       %s", lv->name);