summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-xml-output.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2014-07-23 18:08:08 +0530
committerKaushal M <kaushal@redhat.com>2014-07-24 03:04:38 -0700
commit6328019bd197efa25294194acaf946557d84f9fb (patch)
tree24d6b2d892ef9f6f8fbe7cb72fdf344529a2cb63 /cli/src/cli-xml-output.c
parent00bcf8e80bd65de7a8a102b137d35af3ba2cc3c1 (diff)
cli: Fix no libxml compilation for snapshot status
BUG: 1122186 Change-Id: Ib887f2194258e85d40f65a758b6a963a17911395 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/8363 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'cli/src/cli-xml-output.c')
-rw-r--r--cli/src/cli-xml-output.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index 6ce8041f657..65189a8088f 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -4820,7 +4820,7 @@ out:
*
* @return 0 on success and -1 on failure
*/
-int
+static int
cli_xml_snapshot_status_per_snap (xmlTextWriterPtr writer, xmlDocPtr doc,
dict_t *dict, const char *keyprefix)
{
@@ -5527,3 +5527,24 @@ out:
return 0;
#endif /* HAVE_LIB_XML */
}
+
+int
+cli_xml_snapshot_status_single_snap (cli_local_t *local, dict_t *dict,
+ char *key)
+{
+#if (HAVE_LIB_XML)
+ int ret = -1;
+
+ GF_VALIDATE_OR_GOTO ("cli", (local != NULL), out);
+ GF_VALIDATE_OR_GOTO ("cli", (dict != NULL), out);
+ GF_VALIDATE_OR_GOTO ("cli", (key != NULL), out);
+
+ ret = cli_xml_snapshot_status_per_snap (local->writer, local->doc, dict,
+ key);
+out:
+ return ret;
+#else
+ return 0;
+#endif /* HAVE_LIB_XML */
+}
+