diff options
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/src/cli-rpc-ops.c | 4 | ||||
| -rw-r--r-- | cli/src/cli-xml-output.c | 23 | ||||
| -rw-r--r-- | cli/src/cli.h | 6 | 
3 files changed, 26 insertions, 7 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index d195db5f6e0..4044f0e741c 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -8568,9 +8568,7 @@ cli_snapshot_status (dict_t *dict, gf_cli_rsp *rsp,          }          if (global_state->mode & GLUSTER_MODE_XML) { -                ret = cli_xml_snapshot_status_per_snap (local->writer, -                                                        local->doc, -                                                        dict, key); +                ret = cli_xml_snapshot_status_single_snap (local, dict, key);                  if (ret) {                          gf_log ("cli", GF_LOG_ERROR, "Failed to create "                                  "xml output for snapshot status"); 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 */ +} + diff --git a/cli/src/cli.h b/cli/src/cli.h index 74d35992680..590c8b14f60 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -394,11 +394,11 @@ cli_xml_output_snap_status_begin (cli_local_t *local, int op_ret, int op_errno,  int  cli_xml_output_snap_status_end (cli_local_t *local);  int -cli_xml_snapshot_status_per_snap (xmlTextWriterPtr writer, xmlDocPtr doc, -                                  dict_t *dict, const char *keyprefix); -int  cli_xml_output_snapshot (int cmd_type, dict_t *dict, int op_ret,                           int op_errno, char *op_errstr); +int +cli_xml_snapshot_status_single_snap (cli_local_t *local, dict_t *dict, +                                     char *key);  char *  is_server_debug_xlator (void *myframe);  | 
