diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-07-22 04:17:35 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-22 23:10:38 -0700 |
commit | be4dee16c18e262b168c74face54cf17ca13e2f4 (patch) | |
tree | 5301cf748e07815303d5ba16d5b765849a8165a0 /cli/src/cli-cmd-volume.c | |
parent | 5601c137674b4dabd39b1cf26a36327bfbc707a6 (diff) |
Changes for Dynamic Volume Management
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1196 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1196
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r-- | cli/src/cli-cmd-volume.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index d3960d06575..445432ecd03 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -36,6 +36,12 @@ extern struct rpc_clnt *global_rpc; extern rpc_clnt_prog_t *cli_rpc_prog; +void +cli_cmd_volume_start_usage () +{ + cli_out ("Usage: volume start <volname>"); +} + int cli_cmd_volume_info_cbk (struct cli_state *state, struct cli_cmd_word *word, const char **words, int wordcount) @@ -145,6 +151,11 @@ cli_cmd_volume_start_cbk (struct cli_state *state, struct cli_cmd_word *word, goto out; //TODO: Build validation here + if (wordcount < 3) { + cli_cmd_volume_start_usage (); + goto out; + } + volname = (char *)words[2]; GF_ASSERT (volname); @@ -153,7 +164,7 @@ cli_cmd_volume_start_cbk (struct cli_state *state, struct cli_cmd_word *word, } out: - if (ret) + if (ret && volname) cli_out ("Starting Volume %s failed", volname); return ret; |