diff options
author | Manikandan Selvaganesh <mselvaga@redhat.com> | 2015-07-22 15:12:36 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-08-12 04:47:37 -0700 |
commit | 06c3cf61249e05ae1212a43d5fc1db57bad5f718 (patch) | |
tree | 9db029c01692779cdc81e2ed9e7add51809d954b | |
parent | c0a4171da69537c1947b68014e5fb732b531ecd9 (diff) |
quota : checking for absolute path in quota command
Currently, if absolute path is not entered in
"gluster volume quota <vol-name> list <path>",
it just shows the header (Path Hard-limit Soft-limit...)
instead of showing an error message.
With this patch, it shows an error to enter the absolute path.
Change-Id: I2c3d34bfdc7b924d00b11f8649b73a5069cbc2dc
BUG: 1245558
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/11738
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r-- | cli/src/cli-cmd-parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 6d84fec099c..393af341635 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1171,6 +1171,12 @@ cli_cmd_quota_parse (const char **words, int wordcount, dict_t **options) type = GF_QUOTA_OPTION_TYPE_LIST; + if (words[4] && words[4][0] != '/') { + cli_err ("Please enter absolute path"); + ret = -1; + goto out; + } + i = 4; while (i < wordcount) { snprintf (key, 20, "path%d", i-4); |