Patchwork [BUG:1815] cli: fix Number of bricks output

login
register
Submitter Amar Tumballi
Date 2010-10-05 13:18:21
Message ID <20101005131818.GA11348@gluster.com>
Download mbox | patch
Permalink /patch/5291/
State Accepted
Headers show

Comments

Amar Tumballi - 2010-10-05 13:18:21
Signed-off-by: Amar Tumballi <amar@gluster.com>
---
 cli/src/cli3_1-cops.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index 69c19e7..81e7ed6 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli3_1-cops.c
@@ -447,7 +447,7 @@  gf_cli3_1_get_volume_cbk (struct rpc_req *req, struct iovec *iov,
                         cli_out ("Volume Name: %s", volname);
                         cli_out ("Type: %s", cli_volume_type[vol_type]);
                         cli_out ("Status: %s", cli_volume_status[status], brick_count);
-                        if (sub_count > 1)
+                        if ((sub_count > 1) && (brick_count > sub_count))
                                 cli_out ("Number of Bricks: %d x %d = %d",
                                          brick_count / sub_count, sub_count,
                                          brick_count);