summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorRajesh <rajesh@gluster.com>2011-07-29 13:18:20 +0530
committerAnand Avati <avati@gluster.com>2011-07-29 02:38:44 -0700
commit8efbc829490420ebe75b42a1e0f268b950aaba91 (patch)
tree623c6af4fb6b6b9b76d97291eaf8e631d72e37f9 /cli
parent9759d7e6d8f11ef6111fd6d313ced098efa2e38b (diff)
cli: Improve message in gluster top
Removed "volume top successful" message. If top fails,"volume top unsuccessful" is displayed. If errstr is set, it is displayed. "No entries in list" messages deleted. Change-Id: I8ed35ea7db365b7af6b10833672fcab0e4e8751d BUG: 2722 Reviewed-on: http://review.gluster.com/121 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 50a2631..1782b9b 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -2622,11 +2622,9 @@ gf_cli3_1_fsm_log_cbk (struct rpc_req *req, struct iovec *iov,
}
if (rsp.op_ret) {
- if (strcmp (rsp.op_errstr, "")) {
+ if (strcmp (rsp.op_errstr, ""))
cli_out ("%s", rsp.op_errstr);
- } else if (rsp.op_ret) {
- cli_out ("fsm log unsuccessful");
- }
+ cli_out ("fsm log unsuccessful");
ret = rsp.op_ret;
goto out;
}
@@ -3311,14 +3309,10 @@ gf_cli3_1_top_volume_cbk (struct rpc_req *req, struct iovec *iov,
goto out;
}
- if (rsp.op_ret && strcmp (rsp.op_errstr, "")) {
- cli_out ("%s", rsp.op_errstr);
- } else {
- cli_out ("volume top %s ",
- (rsp.op_ret) ? "unsuccessful": "successful");
- }
-
if (rsp.op_ret) {
+ if (strcmp (rsp.op_errstr, ""))
+ cli_out ("%s", rsp.op_errstr);
+ cli_out ("volume top unsuccessful");
ret = rsp.op_ret;
goto out;
}
@@ -3385,7 +3379,6 @@ gf_cli3_1_top_volume_cbk (struct rpc_req *req, struct iovec *iov,
case GF_CLI_TOP_OPENDIR:
case GF_CLI_TOP_READDIR:
if (!members) {
- cli_out ("No entries in list");
continue;
}
cli_out ("Count\t\tfilename\n=======================");
@@ -3403,7 +3396,6 @@ gf_cli3_1_top_volume_cbk (struct rpc_req *req, struct iovec *iov,
time / 1e6);
if (!members) {
- cli_out ("No entries in list");
continue;
}
cli_out ("MBps\t\tfilename\t\t time\n========================");