From 3016bfa40ce33f89fbfffb564184576f08caf3d7 Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Sun, 6 Oct 2019 19:05:28 +0530 Subject: 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 --- cli/src/cli-xml-output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cli/src/cli-xml-output.c') diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 1570ba50aef..d7b998197ea 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); -- cgit