summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-03-27 17:09:08 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-30 23:56:04 -0700
commit78474f8fab91affae7207d2704aa5a595b871982 (patch)
treea898eadf7d5b18d57bf291ef89a28f53961292e6 /cli
parentffb2e85ff574891639d899cc59fcd9f75d4ce51e (diff)
quota/cli: improve cli error message when setting limit on invalid path
Change-Id: I5976777adf770d42aa33ebbe3833fb14c1ff658e BUG: 1206535 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10026 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index c9b01694436..5471291ab63 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -3121,10 +3121,14 @@ gf_cli_quota_cbk (struct rpc_req *req, struct iovec *iov,
if (global_state->mode & GLUSTER_MODE_XML)
goto xml_output;
- if (strcmp (rsp.op_errstr, ""))
+ if (strcmp (rsp.op_errstr, "")) {
cli_err ("quota command failed : %s", rsp.op_errstr);
- else
+ if (rsp.op_ret == -ENOENT)
+ cli_err ("please enter the path relative to "
+ "the volume");
+ } else {
cli_err ("quota command : failed");
+ }
goto out;
}