diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index b7c6691..53e1436 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -8568,6 +8568,7 @@ cli_snapshot_status (dict_t *dict, gf_cli_rsp *rsp, goto out; } +#if (HAVE_LIB_XML) if (global_state->mode & GLUSTER_MODE_XML) { ret = cli_xml_snapshot_status_per_snap (local->writer, local->doc, @@ -8578,13 +8579,16 @@ cli_snapshot_status (dict_t *dict, gf_cli_rsp *rsp, goto out; } } else { +#endif ret = cli_get_single_snap_status (dict, key); if (ret) { gf_log ("cli", GF_LOG_ERROR, "Could not fetch " "status of snap"); goto out; } +#if (HAVE_LIB_XML) } +#endif ret = 0; out: diff --git a/cli/src/cli.h b/cli/src/cli.h index 74d3599..b451d39 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -393,9 +393,13 @@ cli_xml_output_snap_status_begin (cli_local_t *local, int op_ret, int op_errno, char *op_errstr); int cli_xml_output_snap_status_end (cli_local_t *local); + +#if (HAVE_LIB_XML) int cli_xml_snapshot_status_per_snap (xmlTextWriterPtr writer, xmlDocPtr doc, dict_t *dict, const char *keyprefix); +#endif + int cli_xml_output_snapshot (int cmd_type, dict_t *dict, int op_ret, int op_errno, char *op_errstr);