diff options
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
| -rw-r--r-- | cli/src/cli-cmd-parser.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index d3cb1240fe7..e09db1ce67f 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1323,7 +1323,7 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options)          unsigned           glob    = 0;          unsigned           cmdi    = 0;          char               *opwords[] = { "status", "start", "stop", "config", -                                          NULL }; +                                          "log-rotate", NULL };          char               *w = NULL;          GF_ASSERT (words); @@ -1338,6 +1338,7 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options)           * volume geo-replication [$m [$s]] status           * volume geo-replication [$m] $s config [[!]$opt [$val]]           * volume geo-replication $m $s start|stop +         * volume geo-replication $m [$s] log-rotate           */          if (wordcount < 3) @@ -1414,6 +1415,11 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options)                  if (!masteri || !slavei)                          goto out; +        } else if (strcmp(w, "log-rotate") == 0) { +                type = GF_GSYNC_OPTION_TYPE_ROTATE; + +                if (slavei && !masteri) +                        goto out;          } else                  GF_ASSERT (!"opword mismatch");  | 
