39 bool quiet_orig = out->
quiet;
40 const char *
name = NULL;
41 const char *desc = NULL;
45 out->
err(out,
"Error looking up result code %d", code);
52 out->
message(out,
"result-code", code,
55 out->
quiet = quiet_orig;
101 bool quiet_orig = out->
quiet;
102 const char *
name = NULL;
103 const char *desc = NULL;
108 "Failed to get result code bounds for result code type " 109 "%#010x" PRIx32, (uint32_t)
type);
114 while (code <= end) {
138 out->
message(out,
"result-code", code,
141 out->
quiet = quiet_orig;
int pcmk_list_result_codes(xmlNodePtr *xml, enum pcmk_result_type type, uint32_t flags)
List all valid result codes in a particular family.
int(* message)(pcmk__output_t *out, const char *message_id,...)
crm_exit_t pcmk_rc2exitc(int rc)
Map a function return code to the most similar exit code.
int pcmk__show_result_code(pcmk__output_t *out, int code, enum pcmk_result_type type, uint32_t flags)
int pcmk_show_result_code(xmlNodePtr *xml, int code, enum pcmk_result_type type, uint32_t flags)
Display the name and/or description of a result code.
int pcmk__result_bounds(enum pcmk_result_type, int *lower, int *upper)
void pcmk__xml_output_finish(pcmk__output_t *out, crm_exit_t exit_status, xmlNodePtr *xml)
enum crm_ais_msg_types type
int pcmk__list_result_codes(pcmk__output_t *out, enum pcmk_result_type type, uint32_t flags)
Display result code description.
int pcmk__xml_output_new(pcmk__output_t **out, xmlNodePtr *xml)
bool quiet
Should this formatter supress most output?
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
int(*) int(*) void(* err)(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
void pcmk__register_lib_messages(pcmk__output_t *out)
int pcmk_result_get_strings(int code, enum pcmk_result_type type, const char **name, const char **desc)
Get the name and description of a given result code.
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
Display result code name.
This structure contains everything that makes up a single output formatter.
Display result code number.
pcmk_result_type
Types of Pacemaker result codes.