Blame SOURCES/lvm2-set-default-preferred_names.patch

d617b2
From 6a078fe01b47fa165226a15263c8bd6350b1c307 Mon Sep 17 00:00:00 2001
d617b2
From: Marian Csontos <mcsontos@redhat.com>
d617b2
Date: Thu, 3 Jan 2019 13:49:08 +0100
d617b2
Subject: [PATCH 2/8] lvm2: set default preferred_names
d617b2
d617b2
---
26e710
 conf/example.conf.in         | 3 ++-
146ac4
 lib/config/config_settings.h | 2 +-
26e710
 2 files changed, 3 insertions(+), 2 deletions(-)
146ac4
146ac4
diff --git a/conf/example.conf.in b/conf/example.conf.in
f41bc7
index 05b0857..88858fc 100644
146ac4
--- a/conf/example.conf.in
146ac4
+++ b/conf/example.conf.in
26e710
@@ -122,7 +122,8 @@ devices {
146ac4
 	# Example
146ac4
 	# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
146ac4
 	# 
146ac4
-	# This configuration option does not have a default value defined.
26e710
+	# This configuration option has an automatic default value.
26e710
+	# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
146ac4
 
146ac4
 	# Configuration option devices/filter.
146ac4
 	# Limit the block devices that are used by LVM commands.
146ac4
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
f41bc7
index 2bb72ba..dce9705 100644
146ac4
--- a/lib/config/config_settings.h
146ac4
+++ b/lib/config/config_settings.h
26e710
@@ -269,7 +269,7 @@ cfg(devices_hints_CFG, "hints", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_
26e710
 	"    Use no hints.\n"
146ac4
 	"#\n")
146ac4
 
146ac4
-cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED , CFG_TYPE_STRING, NULL, vsn(1, 2, 19), NULL, 0, NULL,
26e710
+cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#S^/dev/mpath/#S^/dev/mapper/mpath#S^/dev/[hs]d", vsn(1, 2, 19), NULL, 0, NULL,
146ac4
 	"Select which path name to display for a block device.\n"
146ac4
 	"If multiple path names exist for a block device, and LVM needs to\n"
146ac4
 	"display a name for the device, the path names are matched against\n"
d617b2
-- 
d617b2
1.8.3.1
d617b2