pacemaker
2.1.2-ada5c3b36
Scalable High-Availability cluster resource manager
include
crm
common
results_internal.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020-2021 the Pacemaker project contributors
3
*
4
* The version control history for this file may have further details.
5
*
6
* This source code is licensed under the GNU Lesser General Public License
7
* version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8
*/
9
10
#ifndef PCMK__COMMON_RESULTS_INTERNAL__H
11
#define PCMK__COMMON_RESULTS_INTERNAL__H
12
13
#include <glib.h>
// GQuark
14
15
/* Error domains for use with g_set_error */
16
17
GQuark
pcmk__rc_error_quark
(
void
);
18
GQuark
pcmk__exitc_error_quark
(
void
);
19
20
#define PCMK__RC_ERROR pcmk__rc_error_quark()
21
#define PCMK__EXITC_ERROR pcmk__exitc_error_quark()
22
23
/* Action results */
24
25
typedef
struct
{
26
int
exit_status
;
// Child exit status
27
enum
pcmk_exec_status
execution_status;
// Execution status
28
char
*
exit_reason
;
// Brief, human-friendly explanation
29
char
*
action_stdout
;
// Action output
30
char
*
action_stderr
;
// Action error output
31
}
pcmk__action_result_t
;
32
33
void
pcmk__set_result
(
pcmk__action_result_t
*result,
int
exit_status,
34
enum
pcmk_exec_status
exec_status,
35
const
char
*exit_reason);
36
37
void
pcmk__set_result_output
(
pcmk__action_result_t
*result,
38
char
*out,
char
*err);
39
40
void
pcmk__reset_result
(
pcmk__action_result_t
*result);
41
42
#endif // PCMK__COMMON_RESULTS_INTERNAL__H
pcmk__action_result_t
Definition:
results_internal.h:25
pcmk__action_result_t::action_stderr
char * action_stderr
Definition:
results_internal.h:30
pcmk__action_result_t::exit_status
int exit_status
Definition:
results_internal.h:26
pcmk__action_result_t::action_stdout
char * action_stdout
Definition:
results_internal.h:29
pcmk__rc_error_quark
GQuark pcmk__rc_error_quark(void)
pcmk__action_result_t::exit_reason
char * exit_reason
Definition:
results_internal.h:28
pcmk__set_result
void pcmk__set_result(pcmk__action_result_t *result, int exit_status, enum pcmk_exec_status exec_status, const char *exit_reason)
Definition:
results.c:848
pcmk_exec_status
pcmk_exec_status
Execution status.
Definition:
results.h:305
pcmk__exitc_error_quark
GQuark pcmk__exitc_error_quark(void)
pcmk__reset_result
void pcmk__reset_result(pcmk__action_result_t *result)
Definition:
results.c:898
pcmk__set_result_output
void pcmk__set_result_output(pcmk__action_result_t *result, char *out, char *err)
Definition:
results.c:878
Generated on Wed Nov 24 2021 11:15:07 for pacemaker by
1.8.14