10 #ifndef PCMK__COMMON_RESULTS_INTERNAL__H 11 #define PCMK__COMMON_RESULTS_INTERNAL__H 20 const char *assert_condition);
22 #define pcmk__assert(expr) do { \ 24 pcmk__abort_as(__FILE__, __func__, __LINE__, #expr); \ 37 #define pcmk__mem_assert(ptr) do { \ 38 if ((ptr) == NULL) { \ 39 crm_abort(__FILE__, __func__, __LINE__, "Out of memory", FALSE, \ 41 crm_exit(CRM_EX_OSERR); \ 50 #define PCMK__RC_ERROR pcmk__rc_error_quark() 51 #define PCMK__EXITC_ERROR pcmk__exitc_error_quark() 70 #define PCMK__UNKNOWN_RESULT { \ 71 .exit_status = CRM_EX_OK, \ 72 .execution_status = PCMK_EXEC_UNKNOWN, \ 73 .exit_reason = NULL, \ 74 .action_stdout = NULL, \ 75 .action_stderr = NULL, \ 80 const char *exit_reason);
84 const char *format, ...) G_GNUC_PRINTF(4, 5);
87 char *out,
char *err);
113 #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)
_Noreturn void pcmk__abort_as(const char *file, const char *function, int line, const char *assert_condition)
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.