diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:39:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:39:28 +0000 |
commit | 924f5ea83e48277e014ebf0d19a27187cb93e2f7 (patch) | |
tree | 75920a275bba045f6d108204562c218a9a26ea15 /tools/crm_rule.c | |
parent | Adding upstream version 2.1.7. (diff) | |
download | pacemaker-upstream.tar.xz pacemaker-upstream.zip |
Adding upstream version 2.1.8~rc1.upstream/2.1.8_rc1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/crm_rule.c')
-rw-r--r-- | tools/crm_rule.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/crm_rule.c b/tools/crm_rule.c index 5cdc118..aa13de2 100644 --- a/tools/crm_rule.c +++ b/tools/crm_rule.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the Pacemaker project contributors + * Copyright 2019-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * @@ -12,7 +12,7 @@ #include <crm/common/cmdline_internal.h> #include <crm/common/output_internal.h> #include <crm/common/iso8601.h> -#include <crm/msg_xml.h> +#include <crm/common/xml.h> #include <crm/pengine/rules_internal.h> #include <crm/pengine/status.h> #include <pacemaker-internal.h> @@ -174,21 +174,22 @@ main(int argc, char **argv) } // Parse the input XML specified by the command-line options, if any - if (pcmk__str_eq(options.input_xml, "-", pcmk__str_casei)) { - input = stdin2xml(); + if (pcmk__str_eq(options.input_xml, "-", pcmk__str_none)) { + input = pcmk__xml_read(NULL); if (input == NULL) { exit_code = CRM_EX_DATAERR; - g_set_error(&error, PCMK__EXITC_ERROR, exit_code, "Couldn't parse input from STDIN\n"); + g_set_error(&error, PCMK__EXITC_ERROR, exit_code, + "Couldn't parse input from STDIN"); goto done; } } else if (options.input_xml != NULL) { - input = string2xml(options.input_xml); + input = pcmk__xml_parse(options.input_xml); if (input == NULL) { exit_code = CRM_EX_DATAERR; g_set_error(&error, PCMK__EXITC_ERROR, exit_code, - "Couldn't parse input string: %s\n", options.input_xml); + "Couldn't parse input string: %s", options.input_xml); goto done; } } |