From f2d51d6546976731fed5fd165bf57acac3fb0180 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Thu, 10 Mar 2016 16:43:08 +0530 Subject: cli: Do not remove whitespace if key is user.* in volume set setting any user.* option can have multiple words in the key and hence skip the process of trimming whitespaces. Change-Id: Ia295428d7cda55e5470fef668325bea497f2333d BUG: 1316499 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/13669 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Kaushal M --- cli/src/cli-cmd-parser.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cli') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index e37408ddb37..a3d46b60231 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "cli.h" #include "cli-cmd.h" @@ -1510,9 +1511,11 @@ cli_cmd_volume_set_parse (struct cli_state *state, const char **words, count++; - ret = gf_strip_whitespace (value, strlen (value)); - if (ret == -1) - goto out; + if (fnmatch ("user.*", key, FNM_NOESCAPE) != 0) { + ret = gf_strip_whitespace (value, strlen (value)); + if (ret == -1) + goto out; + } if (strlen (value) == 0) { ret = -1; -- cgit