summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinglong Mee <mijinlong@open-fs.com>2017-04-28 05:46:50 -0400
committerAtin Mukherjee <amukherj@redhat.com>2017-05-08 17:35:35 +0000
commit18e07cf01f975c80152e5469fb4e4274f08dc636 (patch)
treed50eb5d74dcb010fd37bb36b523792d41fa14a83
parent0d8923d6d70af702730a43a536a5d0b25b4061dc (diff)
cli: fix build error with --disable-xml-output
./configure --disable-xml-output --disable-georeplication make Making all in src CC cli.o In file included from cli.c:42:0: cli.h:440:24: error: unknown type name ‘xmlTextWriterPtr’ cli_xml_output_common (xmlTextWriterPtr writer, int op_ret, int op_errno, ^ cli.h:443:26: error: unknown type name ‘xmlTextWriterPtr’ cli_xml_snapshot_delete (xmlTextWriterPtr writer, xmlDocPtr doc, dict_t *dict, ^ cli.h:443:51: error: unknown type name ‘xmlDocPtr’ cli_xml_snapshot_delete (xmlTextWriterPtr writer, xmlDocPtr doc, dict_t *dict, ^ make[1]: *** [cli.o] Error 1 make: *** [all-recursive] Error 1 Change-Id: I36c2dfc11f89d774b62dfe6f50b156826bed5b66 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com> Reviewed-on: https://review.gluster.org/17136 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--cli/src/cli-rpc-ops.c3
-rw-r--r--cli/src/cli-xml-output.c17
-rw-r--r--cli/src/cli.h7
3 files changed, 7 insertions, 20 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index d90395c6f76..c79094337b2 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -9406,8 +9406,7 @@ cli_snapshot_remove_reply (gf_cli_rsp *rsp, dict_t *dict, call_frame_t *frame)
}
if (global_state->mode & GLUSTER_MODE_XML) {
- ret = cli_xml_snapshot_delete (local->writer, local->doc,
- dict, rsp);
+ ret = cli_xml_snapshot_delete (local, dict, rsp);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Failed to create "
"xml output for snapshot delete command");
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index d31f0e43607..136c846f29d 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -3691,14 +3691,11 @@ out:
gf_log ("cli", GF_LOG_DEBUG, "Returning %d", ret);
return ret;
}
-#endif
int
cli_xml_output_vol_tier_status (xmlTextWriterPtr writer, dict_t *dict,
enum gf_task_types task_type)
{
-#if (HAVE_LIB_XML)
-
int ret = -1;
int count = 0;
char *node_name = NULL;
@@ -3783,15 +3780,8 @@ cli_xml_output_vol_tier_status (xmlTextWriterPtr writer, dict_t *dict,
out:
gf_log ("cli", GF_LOG_DEBUG, "Returning %d", ret);
return ret;
-
-#else
- return 0;
-
-#endif
}
-
-
-
+#endif
int
cli_xml_output_vol_rebalance (gf_cli_defrag_type op, dict_t *dict, int op_ret,
@@ -5834,12 +5824,13 @@ out:
* @return 0 on success and -1 on failure
*/
int
-cli_xml_snapshot_delete (xmlTextWriterPtr writer, xmlDocPtr doc, dict_t *dict,
- gf_cli_rsp *rsp)
+cli_xml_snapshot_delete (cli_local_t *local, dict_t *dict, gf_cli_rsp *rsp)
{
int ret = -1;
#ifdef HAVE_LIB_XML
char *str_value = NULL;
+ xmlTextWriterPtr writer = local->writer;
+ xmlDocPtr doc = local->doc;
GF_ASSERT (writer);
GF_ASSERT (doc);
diff --git a/cli/src/cli.h b/cli/src/cli.h
index 332d3371055..60492c1b9fc 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -446,11 +446,8 @@ int
cli_xml_output_vol_status_tasks_detail (cli_local_t *local, dict_t *dict);
int
-cli_xml_output_common (xmlTextWriterPtr writer, int op_ret, int op_errno,
- char *op_errstr);
-int
-cli_xml_snapshot_delete (xmlTextWriterPtr writer, xmlDocPtr doc, dict_t *dict,
- gf_cli_rsp *rsp);
+cli_xml_snapshot_delete (cli_local_t *local, dict_t *dict, gf_cli_rsp *rsp);
+
int
cli_xml_snapshot_begin_composite_op (cli_local_t *local);