From 63e472fe49a4d13335c59bd6258010f594c7146a Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Mon, 27 Apr 2015 12:33:06 +0530 Subject: cli/tiering : Parse detach-tier command properly Back port of http://review.gluster.org/10303 gluster detach-tier help should show the usage of detach-tier command properly. Also, instead of force option, if any other was given, then the command should fail with a usage message >Change-Id: Ie801529176db067c98fd1bfada056cbc647973fb >BUG: 1211570 >Signed-off-by: Mohammed Rafi KC >Reviewed-on: http://review.gluster.org/10303 >Tested-by: NetBSD Build System >Tested-by: Gluster Build System >Reviewed-by: Atin Mukherjee >Reviewed-by: Dan Lambright Change-Id: I51ef7c3450c219b2b24724592270461570436010 BUG: 1220050 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/10709 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- cli/src/cli-cmd-volume.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/src/cli-cmd-volume.c') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 91b2a1988d9..7b2fb079e50 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -929,9 +929,11 @@ cli_cmd_volume_detach_tier_cbk (struct cli_state *state, goto out; ret = cli_cmd_volume_detach_tier_parse(words, wordcount, &options); - - if (ret) + if (ret) { + cli_usage_out (word->pattern); + parse_error = 1; goto out; + } ret = dict_set_int32 (options, "force", 1); if (ret) -- cgit