Skip to contentSkip to conversation

Minor multipath fixes

PATCH In review Benjamin Marzinski 2 participants 4 messages Jan 30, 2024 – Jan 31, 2024 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

cover Minor multipath fixes

two small fixes.

Benjamin Marzinski (2):
libmultipath: fix displaying auto_resize config setting multipath-tools tests: add void parameter to functions

 libmultipath/dict.c | 2 --
 tests/alias.c       | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0
author maintainer
#1 lore raw

PATCH 1/2 libmultipath: fix displaying auto_resize config setting

When 56476ebd3 ("multipathd: fix auto-resize configuration") removed AUTO_RESIZE_UNDEFINED, it didn't update print_auto_resize() to print a value for when it was set to 0 (which is now AUTO_RESIZE_NEVER).

Fixes 56476ebd3 ("multipathd: fix auto-resize configuration")
---
 libmultipath/dict.c | 2 --
 1 file changed, 2 deletions(-)
libmultipath/dict.c +0 -2
index 0a160e92..5af036b7 100644
@@ -1691,8 +1691,6 @@ def_auto_resize_handler(struct config *conf, vector strvec, const char *file,
 int
 print_auto_resize(struct strbuf *buff, long v)
 {
-	if (!v)
-		return 0;
 	return append_strbuf_quoted(buff,
 			v == AUTO_RESIZE_GROW_ONLY ? "grow_only" :
 			v == AUTO_RESIZE_GROW_SHRINK ? "grow_shrink" :
Signature · 1 line
2.43.0
author maintainer
#2 lore raw

PATCH 2/2 multipath-tools tests: add void parameter to functions

In reply to Benjamin Marzinski

This allows the tests to be compiled with -Werror=strict-prototypes

Reported-by Tomasz Kłoczko (github.com/opensvc/multipath-tools/issues/80)
---
 tests/alias.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/alias.c +2 -2
index 93e4b395..c2ae915d 100644
@@ -1763,7 +1763,7 @@ static void gufa_check_locking(void **state) {
 	assert_int_equal(lock_errors, 0);
 }
 
-static int test_get_user_friendly_alias()
+static int test_get_user_friendly_alias(void)
 {
 	const struct CMUnitTest tests[] = {
 		cmocka_unit_test_teardown(gufa_empty_new_rw, teardown_bindings),
@@ -1981,7 +1981,7 @@ static void order_06(void **state)
 	order_test(ARRAY_SIZE(ra), ra, true);
 }
 
-static int test_bindings_order()
+static int test_bindings_order(void)
 {
 	const struct CMUnitTest tests[] = {
 		cmocka_unit_test_teardown(order_01, teardown_bindings),
Signature · 1 line
2.43.0
Reviewed-by on the v1 series
#3 lore raw
In reply to Benjamin Marzinski
Quoted 10 lines · Benjamin Marzinski

two small fixes.

Benjamin Marzinski (2):
  libmultipath: fix displaying auto_resize config setting multipath-tools tests: add void parameter to functions

 libmultipath/dict.c | 2 --
 tests/alias.c       | 4 ++--

 2 files changed, 2 insertions(+), 4 deletions(-)

For the series