From bc0b106f0ae8ecd336c7689917e46bc2685603c8 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Fri, 15 Jul 2016 18:49:32 +0530 Subject: cli/xml: Fix wrong XML format in volume get command Without this Patch, 0 0 258 on off 10% 5%... With this patch, 0 0 258 on off 10% 5% ... BUG: 1302277 Change-Id: I6c5a040f659f2244ddcd47c57882b4f300cbe52f Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/14931 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- cli/src/cli-xml-output.c | 6 ++++++ 1 file changed, 6 insertions(+) (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 3d6545c6fed..d03ddb1239a 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -6194,6 +6194,9 @@ cli_xml_output_vol_getopts (dict_t *dict, int op_ret, int op_errno, "the dictionary", dict_key); goto out; } + ret = xmlTextWriterStartElement (writer, (xmlChar *)"Opt"); + XML_RET_CHECK_AND_GOTO (ret, out); + ret = xmlTextWriterWriteFormatElement (writer, (xmlChar *)"Option", "%s", key); @@ -6203,6 +6206,9 @@ cli_xml_output_vol_getopts (dict_t *dict, int op_ret, int op_errno, (xmlChar *)"Value", "%s", value); XML_RET_CHECK_AND_GOTO (ret, out); + + ret = xmlTextWriterEndElement (writer); + XML_RET_CHECK_AND_GOTO (ret, out); } ret = cli_end_xml_output (writer, doc); -- cgit