summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2019-10-06 19:05:28 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-10-11 04:02:49 +0000
commit3016bfa40ce33f89fbfffb564184576f08caf3d7 (patch)
tree37065e1a123ba42cc69221da5011a90f14d5d5be
parent9cfaef0960d206a554035000141935cc0fcf39e5 (diff)
cli: fix distCount value
gluster volume info --xml id displaying wrong distCount value. This patch addresses it. fixes: bz#1758878 Change-Id: I64081597e06018361e6524587b433b0c4b2a0260 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
-rw-r--r--cli/src/cli-xml-output.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index 1570ba5..d7b9981 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -2507,8 +2507,9 @@ cli_xml_output_vol_info(cli_local_t *local, dict_t *dict)
ret = dict_get_int32(dict, key, &dist_count);
if (ret)
goto out;
- ret = xmlTextWriterWriteFormatElement(
- local->writer, (xmlChar *)"distCount", "%d", dist_count);
+ ret = xmlTextWriterWriteFormatElement(local->writer,
+ (xmlChar *)"distCount", "%d",
+ (brick_count / dist_count));
XML_RET_CHECK_AND_GOTO(ret, out);
snprintf(key, sizeof(key), "volume%d.stripe_count", i);