mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 3 years ago
Clone
Blob Blame History Raw
From 6a078fe01b47fa165226a15263c8bd6350b1c307 Mon Sep 17 00:00:00 2001
From: Marian Csontos <mcsontos@redhat.com>
Date: Thu, 3 Jan 2019 13:49:08 +0100
Subject: [PATCH 2/8] lvm2: set default preferred_names

---
 conf/example.conf.in         | 3 ++-
 lib/config/config_settings.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/conf/example.conf.in b/conf/example.conf.in
index 05b0857..88858fc 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -122,7 +122,8 @@ devices {
 	# Example
 	# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
 	# 
-	# This configuration option does not have a default value defined.
+	# This configuration option has an automatic default value.
+	# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
 
 	# Configuration option devices/filter.
 	# Limit the block devices that are used by LVM commands.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 2bb72ba..dce9705 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -269,7 +269,7 @@ cfg(devices_hints_CFG, "hints", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_
 	"    Use no hints.\n"
 	"#\n")
 
-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,
+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,
 	"Select which path name to display for a block device.\n"
 	"If multiple path names exist for a block device, and LVM needs to\n"
 	"display a name for the device, the path names are matched against\n"
-- 
1.8.3.1