|
|
cb8e9e |
From 1232b4c764a9b0f6d8789359048325ff38bf2e07 Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Manikandan Selvaganesh <mselvaga@redhat.com>
|
|
|
cb8e9e |
Date: Wed, 22 Jul 2015 15:12:36 +0530
|
|
|
cb8e9e |
Subject: [PATCH 274/279] quota : checking for absolute path in quota command
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Currently, if absolute path is not entered in
|
|
|
cb8e9e |
"gluster volume quota <vol-name> list <path>",
|
|
|
cb8e9e |
it just shows the header (Path Hard-limit Soft-limit...)
|
|
|
cb8e9e |
instead of showing an error message.
|
|
|
cb8e9e |
|
|
|
cb8e9e |
With this patch, it shows an error to enter the absolute path.
|
|
|
cb8e9e |
|
|
|
cb8e9e |
> Change-Id: I2c3d34bfdc7b924d00b11f8649b73a5069cbc2dc
|
|
|
cb8e9e |
> BUG: 1245558
|
|
|
cb8e9e |
> Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
|
|
|
cb8e9e |
> Reviewed-on: http://review.gluster.org/11738
|
|
|
cb8e9e |
> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
cb8e9e |
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
|
|
|
cb8e9e |
> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
|
|
|
cb8e9e |
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Change-Id: I2c3d34bfdc7b924d00b11f8649b73a5069cbc2dc
|
|
|
cb8e9e |
BUG: 1065651
|
|
|
cb8e9e |
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/55300
|
|
|
cb8e9e |
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
cb8e9e |
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
cli/src/cli-cmd-parser.c | 6 ++++++
|
|
|
cb8e9e |
1 files changed, 6 insertions(+), 0 deletions(-)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
|
|
|
cb8e9e |
index 8f3396f..0f7b5be 100644
|
|
|
cb8e9e |
--- a/cli/src/cli-cmd-parser.c
|
|
|
cb8e9e |
+++ b/cli/src/cli-cmd-parser.c
|
|
|
cb8e9e |
@@ -1176,6 +1176,12 @@ cli_cmd_quota_parse (const char **words, int wordcount, dict_t **options)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
type = GF_QUOTA_OPTION_TYPE_LIST;
|
|
|
cb8e9e |
|
|
|
cb8e9e |
+ if (words[4] && words[4][0] != '/') {
|
|
|
cb8e9e |
+ cli_err ("Please enter absolute path");
|
|
|
cb8e9e |
+ ret = -1;
|
|
|
cb8e9e |
+ goto out;
|
|
|
cb8e9e |
+ }
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
i = 4;
|
|
|
cb8e9e |
while (i < wordcount) {
|
|
|
cb8e9e |
snprintf (key, 20, "path%d", i-4);
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|