From 6328019bd197efa25294194acaf946557d84f9fb Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Wed, 23 Jul 2014 18:08:08 +0530 Subject: cli: Fix no libxml compilation for snapshot status BUG: 1122186 Change-Id: Ib887f2194258e85d40f65a758b6a963a17911395 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/8363 Reviewed-by: Rajesh Joseph Reviewed-by: Santosh Pradhan Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee --- cli/src/cli-xml-output.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (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 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 */ +} + -- cgit