diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2010-08-25 01:32:52 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-25 00:41:54 -0700 |
commit | 36ae62ada88b8477994d17527868370a4634999e (patch) | |
tree | c4d215ee6718852c47571e90ab6beb0325039127 | |
parent | 29a9b190148ac7f2bf83e381a9e8024b164904b6 (diff) |
cli: print volume create command usage in-case of parse errors
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1263 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1263
-rw-r--r-- | cli/src/cli-cmd-volume.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index fddcc213f..ae2b6b2aa 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -67,6 +67,12 @@ out: } +void +cli_cmd_volume_create_usage () +{ + cli_out ("usage: volume create <NEW-VOLNAME> " + "[stripe <COUNT>] [replica <COUNT>] <NEW-BRICK> ..."); +} int cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word, @@ -86,7 +92,8 @@ 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) { - cli_out ("Command Parsing Failed"); + printf ("Command Parsing failed, "); + cli_cmd_volume_create_usage (); goto out; } |