summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 0dfc2af9144..fddcc213f00 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -85,8 +85,10 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word,
ret = cli_cmd_volume_create_parse (words, wordcount, &options);
- if (ret)
+ if (ret) {
+ cli_out ("Command Parsing Failed");
goto out;
+ }
if (proc->fn) {
ret = proc->fn (frame, THIS, options);
@@ -94,8 +96,10 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word,
out:
if (ret) {
- char *volname = (char *) words[2];
- cli_out ("Creating Volume %s failed",volname );
+ if (wordcount > 2) {
+ char *volname = (char *) words[2];
+ cli_out ("Creating Volume %s failed",volname );
+ }
}
if (options)
dict_destroy (options);