From a6098362f93e321ce25424d2f95cc1d61783f6b9 Mon Sep 17 00:00:00 2001 From: Rahul C S Date: Thu, 15 Dec 2011 18:16:29 +0530 Subject: Default option to be set to "all" if no option is given to volume statedump cli command. Change-Id: Ia167e9d0fd1f9a50f79554d40e6fa7d292896aa4 BUG: 767545 Signed-off-by: Rahul C S Reviewed-on: http://review.gluster.com/799 Tested-by: Gluster Build System Reviewed-by: Kaushal M Reviewed-by: Amar Tumballi --- cli/src/cli-cmd-volume.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index b5a177a86..2336dfe44 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1479,7 +1479,7 @@ cli_cmd_volume_statedump_cbk (struct cli_state *state, struct cli_cmd_word *word goto out; } - if (wordcount > 3) { + if (wordcount >= 3) { ret = cli_cmd_volume_statedump_options_parse (words, wordcount, &options); if (ret) { @@ -1489,19 +1489,6 @@ cli_cmd_volume_statedump_cbk (struct cli_state *state, struct cli_cmd_word *word cli_out ("Error parsing options"); cli_usage_out (word->pattern); } - } else { - options = dict_new (); - if (!options) { - ret = -1; - gf_log ("cli", GF_LOG_ERROR, "Could not create dict"); - goto out; - } - ret = dict_set_str (options, "options",""); - if (ret) - goto out; - ret = dict_set_int32 (options, "option-cnt", 0); - if (ret) - goto out; } ret = dict_set_str (options, "volname", (char *)words[2]); -- cgit