From c2518242ed0723b7fa6c09564a3330572e189d74 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Fri, 20 Aug 2010 01:16:21 +0000 Subject: Hide cli peer command port option Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 1261 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1261 --- cli/src/cli-cmd-peer.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c index e88f66b0e..f1847a68c 100644 --- a/cli/src/cli-cmd-peer.c +++ b/cli/src/cli-cmd-peer.c @@ -40,19 +40,19 @@ extern rpc_clnt_prog_t *cli_rpc_prog; void cli_cmd_probe_usage () { - cli_out ("Usage: probe [port]"); + cli_out ("Usage: probe "); } void cli_cmd_deprobe_usage () { - cli_out ("Usage: detach [port]"); + cli_out ("Usage: detach "); } void cli_cmd_peer_status_usage () { - cli_out ("Usage: peer status [port]"); + cli_out ("Usage: peer status"); } int @@ -64,7 +64,7 @@ cli_cmd_peer_probe_cbk (struct cli_state *state, struct cli_cmd_word *word, call_frame_t *frame = NULL; dict_t *dict = NULL; - if (!((wordcount == 4) || (wordcount == 3))) { + if (!(wordcount == 3)) { cli_cmd_probe_usage (); goto out; } @@ -83,12 +83,12 @@ cli_cmd_peer_probe_cbk (struct cli_state *state, struct cli_cmd_word *word, if (ret) goto out; - if (words[3]) { +/* if (words[3]) { ret = dict_set_str (dict, "port", (char *)words[3]); if (ret) goto out; } - +*/ if (proc->fn) { ret = proc->fn (frame, THIS, dict); } @@ -109,7 +109,7 @@ cli_cmd_peer_deprobe_cbk (struct cli_state *state, struct cli_cmd_word *word, call_frame_t *frame = NULL; dict_t *dict = NULL; - if (!((wordcount == 3) || (wordcount == 4))) { + if (!(wordcount == 3) ) { cli_cmd_deprobe_usage (); goto out; } @@ -126,12 +126,12 @@ cli_cmd_peer_deprobe_cbk (struct cli_state *state, struct cli_cmd_word *word, if (ret) goto out; - if (words[3]) { +/* if (words[3]) { ret = dict_set_str (dict, "port", (char *)words[3]); if (ret) goto out; } - +*/ if (proc->fn) { ret = proc->fn (frame, THIS, dict); } @@ -173,7 +173,7 @@ out: } struct cli_cmd cli_probe_cmds[] = { - { "peer probe [PORT]", + { "peer probe ", cli_cmd_peer_probe_cbk, "probe peer specified by "}, -- cgit