Skip to contentSkip to conversation

libmultipath: fix error parsing "find_multipaths strict"

PATCH In review Martin Wilck 2 participants 2 messages May 15, 2018 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmultipath: fix error parsing "find_multipaths strict"

If "find_multipaths strict" is set in multipath.conf, the error message "illegal value for find_multipaths: strict" is printed. This causes no functional problem, as "strict" happens to be the default, fallback value. It should be fixed nonetheless. FIND_MULTIPATHS_STRICT, having the highest numeric value, must be last in the enum.

Fixes c36f2f42 "libmultipath: change find_multipaths option to multi-value"
---
 libmultipath/structs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/structs.h +1 -1
index eb6a1788..e424b150 100644
@@ -122,9 +122,9 @@ enum find_multipaths_states {
 	FIND_MULTIPATHS_UNDEF = YNU_UNDEF,
 	FIND_MULTIPATHS_OFF = YNU_NO,
 	FIND_MULTIPATHS_ON = _FIND_MULTIPATHS_F,
-	FIND_MULTIPATHS_STRICT = _FIND_MULTIPATHS_F|_FIND_MULTIPATHS_N,
 	FIND_MULTIPATHS_GREEDY = _FIND_MULTIPATHS_I,
 	FIND_MULTIPATHS_SMART = _FIND_MULTIPATHS_F|_FIND_MULTIPATHS_I,
+	FIND_MULTIPATHS_STRICT = _FIND_MULTIPATHS_F|_FIND_MULTIPATHS_N,
 	__FIND_MULTIPATHS_LAST,
 };
 
Signature · 1 line
2.16.3
#1 lore raw

Merged,
thanks.

Quoted 32 lines · Martin Wilck

If "find_multipaths strict" is set in multipath.conf, the error message "illegal value for find_multipaths: strict" is printed. This causes no functional problem, as "strict" happens to be the default, fallback value. It should be fixed nonetheless. FIND_MULTIPATHS_STRICT, having the highest numeric value, must be last in the enum.

Fixes c36f2f42 "libmultipath: change find_multipaths option to

multi-value"

---
 libmultipath/structs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/structs.h +1 -2
index eb6a1788..e424b150 100644
@@ -122,9 +122,9 @@ enum find_multipaths_states {
        FIND_MULTIPATHS_UNDEF = YNU_UNDEF,
        FIND_MULTIPATHS_OFF = YNU_NO,
        FIND_MULTIPATHS_ON = _FIND_MULTIPATHS_F,
-       FIND_MULTIPATHS_STRICT = _FIND_MULTIPATHS_F|_FIND_MULTIPATHS_N,
        FIND_MULTIPATHS_GREEDY = _FIND_MULTIPATHS_I,
        FIND_MULTIPATHS_SMART = _FIND_MULTIPATHS_F|_FIND_MULTIPATHS_I,
+       FIND_MULTIPATHS_STRICT = _FIND_MULTIPATHS_F|_FIND_MULTIPATHS_N,
        __FIND_MULTIPATHS_LAST,
 };
 
--

2.16.3