From 4b813b3d14476a5cf6a3a54c32c2939a31fe9ba9 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Sun, 17 Apr 2011 10:46:06 +0000 Subject: mgmt/glusterd: unify the geo-replication status rpc messages. the intelligence of determining the type of status command is now at glusterd, rather then explicitly setting it while parsing at cli. Signed-off-by: Kaushik BV Signed-off-by: Anand Avati BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536 --- cli/src/cli-cmd-parser.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'cli/src/cli-cmd-parser.c') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 1449d62fa1f..70a6327511e 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1127,7 +1127,6 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options) char *append_str = NULL; size_t append_len = 0; int i = 0; - int32_t status_type = 0; GF_ASSERT (words); GF_ASSERT (options); @@ -1145,18 +1144,7 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options) if ((strcmp (words[2], "status")) == 0) { type = GF_GSYNC_OPTION_TYPE_STATUS; - if (wordcount == 3) - status_type = GF_GSYNC_OPTION_TYPE_STATUS_ALL; - else if (wordcount == 4) - status_type = GF_GSYNC_OPTION_TYPE_STATUS_MASTER; - else if (wordcount == 5) - status_type = GF_GSYNC_OPTION_TYPE_STATUS_MST_SLV; - else - goto out; - - - ret = dict_set_int32 (dict, "status-type", status_type); - if (ret < 0) + if (wordcount > 5) goto out; if (wordcount < 4) @@ -1171,8 +1159,6 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options) if (ret < 0) goto out; - - goto set_type; } -- cgit