summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2014-03-07 05:16:02 +0530
committerRajesh Joseph <rjoseph@redhat.com>2014-03-10 06:21:06 -0700
commit9fe1f24e42fa54b58616cd846fce76ab60d7e4e8 (patch)
treeb1089265bb7dfea9c03351a419ac05d0c7a01b22 /cli/src/cli-rpc-ops.c
parent3a7fdc198ada9621333b560c8911a05844413751 (diff)
glusterd/snapshot : Introduced a macro for snapshot info command.
Also populated the error message in case of snapshot create, list, info and delete failure. When snapshot list, info or delete is issued, if the entered snapname/volname does not exist then populate error string along with logging. Change-Id: I632d25110bc63ff0e4ac98b27e2f410f7ccbb990 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7203 Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 0447e5baf..60abfc1bf 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -8147,6 +8147,14 @@ gf_cli_snapshot_cbk (struct rpc_req *req, struct iovec *iov,
break;
case GF_SNAP_OPTION_TYPE_LIST:
+ if (rsp.op_ret) {
+ cli_err ("Snapshot list : failed: %s",
+ rsp.op_errstr ? rsp.op_errstr :
+ "Please check log file for details");
+ ret = rsp.op_ret;
+ goto out;
+ }
+
ret = cli_snapshot_list (dict);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Failed to display "