Skip to contentSkip to conversation

two minor multipath tools fixes

PATCH Applied Benjamin Marzinski 2 participants 2 messages Nov 11, 2005 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

There was a spot where multipathd's reply length forgot to count the NULL, and I noticed that the way domap go rewritten, the dry-run option doesn't print out the maps.

This patch fixes both.

-Ben

multipath/main.c +3 -1
diff -urpN mp-devel/multipath/main.c mp-devel-patched/multipath/main.c
@@ -626,8 +626,10 @@ domap (struct multipath * mpp)
 	/*
 	 * last chance to quit before touching the devmaps
 	 */
-	if (conf->dry_run)
+	if (conf->dry_run) {
+		print_mp(mpp);
 		return 0;
+	}
 
 	switch (mpp->action) {
 	case ACT_NOTHING:
multipathd/cli.c +1 -1
diff -urpN mp-devel/multipathd/cli.c mp-devel-patched/multipathd/cli.c
@@ -314,7 +314,7 @@ parse_cmd (char * cmd, char ** reply, in
 
 	if (!cmdvec) {
 		*reply = genhelp_handler();
-		*len = strlen(*reply);
+		*len = strlen(*reply) + 1;
 		return 0;
 	}
 
#1 lore raw
Quoted 6 lines · Benjamin Marzinski

There was a spot where multipathd's reply length forgot to count the NULL, and I noticed that the way domap go rewritten, the dry-run option doesn't print out the maps.

This patch fixes both.

Applied, thanks.

Regards,
cvaroqui