summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2016-07-15 18:49:32 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-08-10 21:08:28 -0700
commit757138048fa5d6951dae9114b603f4aae0c8df21 (patch)
tree1a589120013f4354d309b1f95d67a22f0cf00ff2 /cli
parent89ae9c91c39e64d26099f6f9c1ff2e0e880d4b6e (diff)
cli/xml: Fix wrong XML format in volume get command
Without this Patch, <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volGetopts> <count>258</count> <Option>cluster.lookup-unhashed</Option> <Value>on</Value> <Option>cluster.lookup-optimize</Option> <Value>off</Value> <Option>cluster.min-free-disk</Option> <Value>10%</Value> <Option>cluster.min-free-inodes</Option> <Value>5%</Value>... With this patch, <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volGetopts> <count>258</count> <Opt> <Option>cluster.lookup-unhashed</Option> <Value>on</Value> </Opt> <Opt> <Option>cluster.lookup-optimize</Option> <Value>off</Value> </Opt> <Opt> <Option>cluster.min-free-disk</Option> <Value>10%</Value> </Opt> <Opt> <Option>cluster.min-free-inodes</Option> <Value>5%</Value> </Opt>... > Signed-off-by: Aravinda VK <avishwan@redhat.com> > Reviewed-on: http://review.gluster.org/14931 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> (cherry picked from commit bc0b106f0ae8ecd336c7689917e46bc2685603c8) BUG: 1357767 Change-Id: I6c5a040f659f2244ddcd47c57882b4f300cbe52f Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14950 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-xml-output.c6
1 files changed, 6 insertions, 0 deletions
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);