[dm-devel] [PATCH 16/16] multipathd: Fix command completion in interactive mode

mwilck at suse.com mwilck at suse.com
Thu Sep 1 16:09:52 UTC 2022


From: Martin Wilck <mwilck at suse.com>

The command completion never worked, because the handlers
array wasn't initialized in client mode.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 multipathd/cli.c  | 2 ++
 multipathd/main.c | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/multipathd/cli.c b/multipathd/cli.c
index d1bfeee..5d25ddb 100644
--- a/multipathd/cli.c
+++ b/multipathd/cli.c
@@ -14,6 +14,7 @@
 
 #include "mpath_cmd.h"
 #include "cli.h"
+#include "cli_handlers.h"
 #include "debug.h"
 #include "strbuf.h"
 
@@ -451,6 +452,7 @@ cli_init (void) {
 	if (alloc_handlers())
 		return 1;
 
+	init_handler_callbacks();
 	return 0;
 }
 
diff --git a/multipathd/main.c b/multipathd/main.c
index 4a65359..ba52d39 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1797,7 +1797,6 @@ uxlsnrloop (void * ap)
 	/* Tell main thread that thread has started */
 	post_config_state(DAEMON_CONFIGURE);
 
-	init_handler_callbacks();
 	umask(077);
 
 	/*
-- 
2.37.1



More information about the dm-devel mailing list