summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2019-11-30 15:25:11 +0530
committergluster-ant <bugzilla-bot@gluster.org>2019-11-30 15:25:11 +0530
commite1fa3dacf83e0f16aae0888b4c9e96a1497ac74c (patch)
tree06fc16e0381483a29841603e1fc50be089cc83a0 /cli/src/cli-cmd-parser.c
parent5b1483e636634b8d5bbd30804e6ccb4d376f872a (diff)
downloadglusterfs-e1fa3dacf83e0f16aae0888b4c9e96a1497ac74c.tar.gz
glusterfs-e1fa3dacf83e0f16aae0888b4c9e96a1497ac74c.tar.xz
glusterfs-e1fa3dacf83e0f16aae0888b4c9e96a1497ac74c.zip
Removing old log rotate command.
The old command for log rotate is still present removing it completely. Also adding testcase to test the log rotate command with both the old as well as the new command and fixing testcase which use the old syntax to use the new one. Code to be removed: 1. In cli-cmd-volume.c from struct cli_cmd volume_cmds[]: {"volume log rotate <VOLNAME> [BRICK]", cli_cmd_log_rotate_cbk, "rotate the log file for corresponding volume/brick" " NOTE: This is an old syntax, will be deprecated from next release."}, 2. In cli-cmd-volume.c from cli_cmd_log_rotate_cbk(): ||(strcmp("rotate", words[2]) == 0))) 3. In cli-cmd-parser.c from cli_cmd_log_rotate_parse() if (strcmp("rotate", words[2]) == 0) volname = (char *)words[3]; else fixes: bz#1750387 Change-Id: I56e4d295044e8d5fd1fc0d848bc87e135e9e32b4 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 73a3cb31f1..4d65d4de87 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -2586,8 +2586,6 @@ cli_cmd_log_rotate_parse(const char **words, int wordcount, dict_t **options)
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);