From 78474f8fab91affae7207d2704aa5a595b871982 Mon Sep 17 00:00:00 2001 From: vmallika Date: Fri, 27 Mar 2015 17:09:08 +0530 Subject: quota/cli: improve cli error message when setting limit on invalid path Change-Id: I5976777adf770d42aa33ebbe3833fb14c1ff658e BUG: 1206535 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/10026 Reviewed-by: Atin Mukherjee Tested-by: Gluster Build System Reviewed-by: Sachin Pandit Reviewed-by: Vijay Bellur --- cli/src/cli-rpc-ops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cli/src/cli-rpc-ops.c') 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; } -- cgit