Skip to contentSkip to conversation

multipath-tools: replace static and define default values for config options

PATCH In review Xose Vazquez Perez 2 participants 2 messages Oct 19, 2016 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: replace static and define default values for config options

Replace "const" by PRIO_CONST.
Replace static force_sync and partition_delim values, and define DEFAULT_FORCE_SYNC and DEFAULT_PARTITION_DELIM

Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 libmultipath/config.c   | 4 ++--
 libmultipath/defaults.h | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
libmultipath/config.c +2 -2
index 92e4deb..ed51afb 100644
@@ -606,8 +606,8 @@ load_config (char * file)
 	conf->fast_io_fail = DEFAULT_FAST_IO_FAIL;
 	conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER;
 	conf->detect_prio = DEFAULT_DETECT_PRIO;
-	conf->force_sync = 0;
-	conf->partition_delim = NULL;
+	conf->force_sync = DEFAULT_FORCE_SYNC;
+	conf->partition_delim = DEFAULT_PARTITION_DELIM;
 	conf->processed_main_config = 0;
 	conf->find_multipaths = DEFAULT_FIND_MULTIPATHS;
 	conf->uxsock_timeout = DEFAULT_REPLY_TIMEOUT;
libmultipath/defaults.h +3 -1
index e9581a6..9af9a9a 100644
@@ -28,11 +28,13 @@
 #define DEFAULT_RETRIGGER_DELAY	10
 #define DEFAULT_RETRIGGER_TRIES	3
 #define DEFAULT_UEV_WAIT_TIMEOUT 30
-#define DEFAULT_PRIO		"const"
+#define DEFAULT_PRIO		PRIO_CONST
 #define DEFAULT_PRIO_ARGS	""
 #define DEFAULT_CHECKER		TUR
 #define DEFAULT_FLUSH		FLUSH_DISABLED
 #define DEFAULT_USER_FRIENDLY_NAMES USER_FRIENDLY_NAMES_OFF
+#define DEFAULT_FORCE_SYNC	0
+#define DEFAULT_PARTITION_DELIM	NULL
 
 #define DEFAULT_CHECKINT	5
 #define MAX_CHECKINT(a)		(a << 2)
Signature · 1 line
2.10.1
#1 lore raw

Merged.

Quoted 52 lines · Xose Vazquez Perez

Replace "const" by PRIO_CONST.
Replace static force_sync and partition_delim values, and define DEFAULT_FORCE_SYNC and DEFAULT_PARTITION_DELIM

Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 libmultipath/config.c   | 4 ++--
 libmultipath/defaults.h | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
libmultipath/config.c +2 -2
index 92e4deb..ed51afb 100644
@@ -606,8 +606,8 @@ load_config (char * file)
        conf->fast_io_fail = DEFAULT_FAST_IO_FAIL;
        conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER;
        conf->detect_prio = DEFAULT_DETECT_PRIO;
-       conf->force_sync = 0;
-       conf->partition_delim = NULL;
+       conf->force_sync = DEFAULT_FORCE_SYNC;
+       conf->partition_delim = DEFAULT_PARTITION_DELIM;
        conf->processed_main_config = 0;
        conf->find_multipaths = DEFAULT_FIND_MULTIPATHS;
        conf->uxsock_timeout = DEFAULT_REPLY_TIMEOUT;
libmultipath/defaults.h +3 -2
index e9581a6..9af9a9a 100644
@@ -28,11 +28,13 @@
 #define DEFAULT_RETRIGGER_DELAY        10
 #define DEFAULT_RETRIGGER_TRIES        3
 #define DEFAULT_UEV_WAIT_TIMEOUT 30
-#define DEFAULT_PRIO           "const"
+#define DEFAULT_PRIO           PRIO_CONST
 #define DEFAULT_PRIO_ARGS      ""
 #define DEFAULT_CHECKER                TUR
 #define DEFAULT_FLUSH          FLUSH_DISABLED
 #define DEFAULT_USER_FRIENDLY_NAMES USER_FRIENDLY_NAMES_OFF
+#define DEFAULT_FORCE_SYNC     0
+#define DEFAULT_PARTITION_DELIM        NULL
 
 #define DEFAULT_CHECKINT       5
 #define MAX_CHECKINT(a)                (a << 2)
--

2.10.1