diff options
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
| -rw-r--r-- | cli/src/cli-cmd-parser.c | 19 | 
1 files changed, 17 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 26ac6f384eb..547f1d90f01 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1763,7 +1763,7 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options)          unsigned           cmdi    = 0;          char               *opwords[] = { "create", "status", "start", "stop",                                            "config", "force", "delete", -                                          "push-pem", NULL }; +                                          "push-pem", "detail", NULL };          char               *w = NULL;          GF_ASSERT (words); @@ -1776,7 +1776,7 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options)          /* new syntax:           *           * volume geo-replication $m $s create [push-pem] [force] -         * volume geo-replication [$m [$s]] status +         * volume geo-replication [$m [$s]] status [detail]           * volume geo-replication [$m] $s config [[!]$opt [$val]]           * volume geo-replication $m $s start|stop [force]           * volume geo-replication $m $s delete @@ -1873,6 +1873,21 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options)          if (ret)                  goto out; +        if (!strcmp ((char *)words[wordcount-1], "detail")) { +                if (strcmp ((char *)words[wordcount-2], "status")) { +                        ret = -1; +                        goto out; +                } +                if (!slavei || !masteri) { +                        ret = -1; +                        goto out; +                } +                ret = dict_set_uint32 (dict, "status-detail", _gf_true); +                if (ret) +                        goto out; +                cmdi++; +        } +          if (type != GF_GSYNC_OPTION_TYPE_CONFIG &&              (cmdi < wordcount - 1 || glob))                  goto out;  | 
