summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
authorRahul C S <rahulcs@redhat.com>2011-12-15 18:16:29 +0530
committerVijay Bellur <vijay@gluster.com>2011-12-19 08:49:35 -0800
commita6098362f93e321ce25424d2f95cc1d61783f6b9 (patch)
tree9218abde58cfd27b1b52c28e82bc343fa1e2cf58 /cli/src/cli-cmd-volume.c
parent3a0fe71cebd59c1204c60a7d20b2fe2b94f07665 (diff)
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 <rahulcs@redhat.com> Reviewed-on: http://review.gluster.com/799 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index b5a177a869d..2336dfe4434 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]);