10 #ifndef PCMK__COMMON_RESULTS_INTERNAL__H 11 #define PCMK__COMMON_RESULTS_INTERNAL__H 28 #define pcmk__mem_assert(ptr) do { \ 29 if ((ptr) == NULL) { \ 30 crm_abort(__FILE__, __func__, __LINE__, "Out of memory", FALSE, \ 32 crm_exit(CRM_EX_OSERR); \ 41 #define PCMK__RC_ERROR pcmk__rc_error_quark() 42 #define PCMK__EXITC_ERROR pcmk__exitc_error_quark() 61 #define PCMK__UNKNOWN_RESULT { \ 62 .exit_status = CRM_EX_OK, \ 63 .execution_status = PCMK_EXEC_UNKNOWN, \ 64 .exit_reason = NULL, \ 65 .action_stdout = NULL, \ 66 .action_stderr = NULL, \ 71 const char *exit_reason);
75 const char *format, ...) G_GNUC_PRINTF(4, 5);
78 char *out,
char *err);
104 #endif // PCMK__COMMON_RESULTS_INTERNAL__H
void pcmk__format_result(pcmk__action_result_t *result, int exit_status, enum pcmk_exec_status exec_status, const char *format,...) G_GNUC_PRINTF(4
void void pcmk__set_result_output(pcmk__action_result_t *result, char *out, char *err)
enum pcmk_exec_status execution_status
int pcmk__result_bounds(enum pcmk_result_type, int *lower, int *upper)
void pcmk__copy_result(const pcmk__action_result_t *src, pcmk__action_result_t *dst)
Action completed, result is known.
int pcmk__bzlib2rc(int bz2)
Map a bz2 return code to the most similar Pacemaker return code.
pcmk__action_result_t result
int pcmk__gaierror2rc(int gai)
Map a getaddrinfo() return code to the most similar Pacemaker return code.
GQuark pcmk__rc_error_quark(void)
void pcmk__set_result(pcmk__action_result_t *result, int exit_status, enum pcmk_exec_status exec_status, const char *exit_reason)
pcmk_exec_status
Execution status.
GQuark pcmk__exitc_error_quark(void)
void pcmk__reset_result(pcmk__action_result_t *result)
pcmk_result_type
Types of Pacemaker result codes.