From 4152ef34ec08e09e885334955afe3ec88e798eb5 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Tue, 10 Sep 2013 15:14:52 +0530 Subject: glusterd/cli: Status detail cli parse check and vol geo status crash fix Change-Id: I1841864273fc4242de15fbfcf76fd5de40269f28 BUG: 1006249 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/5889 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- cli/src/cli-cmd-parser.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 547f1d90f..33a6c0104 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1810,6 +1810,13 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options) if (slavei == 3) masteri = 2; } else if (i <= 3) { + if (!strcmp ((char *)words[wordcount-1], "detail")) { + /* For status detail it is mandatory to provide + * both master and slave */ + ret = -1; + goto out; + } + /* no $s, can only be status cmd * (with either a single $m before it or nothing) * -- these conditions imply that i <= 3 after -- cgit