From ada4ab0bb93d00fcccbd566cb9cce8265ecf7c67 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Tue, 5 Jun 2012 15:07:23 +0530 Subject: cli: Fix error output for peer probe on address validation failure Displays an error message and sets proper return value on failure of address validation in peer probe. Change-Id: I5ced5524040e19a95dc832b6f676874983d0f2a7 BUG: 817648 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/3520 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- cli/src/cli-cmd-peer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cli') diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c index 4ac1630e5..9b4786611 100644 --- a/cli/src/cli-cmd-peer.c +++ b/cli/src/cli-cmd-peer.c @@ -76,8 +76,10 @@ cli_cmd_peer_probe_cbk (struct cli_state *state, struct cli_cmd_word *word, if (ret == 1) { ret = 0; } else { + cli_out ("%s is an invalid address", words[2]); cli_usage_out (word->pattern); parse_error = 1; + ret = -1; goto out; } /* if (words[3]) { -- cgit