summaryrefslogtreecommitdiffstats
path: root/cli/src/cli3_1-cops.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-07-26 12:10:08 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-27 01:20:12 -0700
commita7795fedd4ee2ed7de2dce89fd782ae20b03f6a4 (patch)
tree60e173fcab4bbcf78060755b93dda83e2b707a42 /cli/src/cli3_1-cops.c
parentf803fae036177c3b9d9513f5b6300d426366eb62 (diff)
cli: Changes to provide proper exit status for gluster commandline
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1205 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1205
Diffstat (limited to 'cli/src/cli3_1-cops.c')
-rw-r--r--cli/src/cli3_1-cops.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index 6ebe6ddbe40..8e6c76ae688 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli3_1-cops.c
@@ -33,6 +33,7 @@
#include "protocol-common.h"
extern rpc_clnt_prog_t *cli_rpc_prog;
+extern int cli_op_ret;
int
gf_cli3_1_probe_cbk (struct rpc_req *req, struct iovec *iov,
@@ -60,7 +61,7 @@ gf_cli3_1_probe_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
return ret;
}
@@ -90,7 +91,7 @@ gf_cli3_1_deprobe_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
return ret;
}
@@ -191,7 +192,7 @@ gf_cli3_1_list_friends_cbk (struct rpc_req *req, struct iovec *iov,
ret = 0;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
if (ret)
cli_out ("Command Execution Failed");
@@ -299,7 +300,7 @@ gf_cli3_1_get_volume_cbk (struct rpc_req *req, struct iovec *iov,
ret = 0;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
if (ret)
cli_out ("Command Execution Failed");
@@ -341,7 +342,7 @@ gf_cli3_1_create_volume_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
return ret;
}
@@ -379,7 +380,7 @@ gf_cli3_1_delete_volume_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
gf_log ("", GF_LOG_NORMAL, "Returning with %d", ret);
return ret;
}
@@ -419,7 +420,7 @@ gf_cli3_1_start_volume_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
return ret;
}
@@ -458,7 +459,7 @@ gf_cli3_1_stop_volume_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
return ret;
}
@@ -497,7 +498,7 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
return ret;
}
@@ -582,7 +583,7 @@ gf_cli3_1_add_brick_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
out:
- cli_cmd_broadcast_response ();
+ cli_cmd_broadcast_response (ret);
return ret;
}