From a193f2262b93a06bf1a299f423d4ebaaa171a539 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Thu, 28 Feb 2013 14:41:52 +0530 Subject: cli: Changed log rotate command format to common format. Problem: The syntax of log rotate was volume log rotate [] All other commands are of the form: volume [|options] Solution: Changed log rotate command usage to common format. Old syntax is also supported, it will be deprecated in next release. Change-Id: Ia6f6665185a1549c6f79ca763599b446f29e2c78 BUG: 844187 Signed-off-by: Raghavendra Talur Reviewed-on: http://review.gluster.org/4594 Reviewed-by: Kaushal M Tested-by: Gluster Build System --- cli/src/cli-cmd-parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli/src/cli-cmd-parser.c') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 7a2ff026d88..1513e0c5ef5 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1605,7 +1605,10 @@ cli_cmd_log_rotate_parse (const char **words, int wordcount, dict_t **options) if (!dict) goto out; - volname = (char *)words[3]; + if (strcmp ("rotate", words[3]) == 0) + volname = (char *)words[2]; + else if (strcmp ("rotate", words[2]) == 0) + volname = (char *)words[3]; GF_ASSERT (volname); ret = dict_set_str (dict, "volname", volname); -- cgit