diff options
| author | Avra Sengupta <asengupt@redhat.com> | 2013-09-10 15:14:52 +0530 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2013-09-21 23:13:57 -0700 | 
| commit | 4152ef34ec08e09e885334955afe3ec88e798eb5 (patch) | |
| tree | 4b96fcaccb9194a5012564269a6ec33ac0fef619 /cli/src | |
| parent | 7f608415063f04a1035bfe7d0f8ddfb9f0215e5c (diff) | |
glusterd/cli: Status detail cli parse check and vol geo status crash fix
Change-Id: I1841864273fc4242de15fbfcf76fd5de40269f28
BUG: 1006249
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5889
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src')
| -rw-r--r-- | cli/src/cli-cmd-parser.c | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 547f1d90f01..33a6c0104b0 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  | 
