This source file includes following definitions.
- services_ocf_exitcode_str
1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_SERVICES_COMPAT__H
11 #define PCMK__CRM_SERVICES_COMPAT__H
12
13 #include <crm/common/results.h>
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19
20 static inline const char *
21 services_ocf_exitcode_str(enum ocf_exitcode code)
22 {
23 switch (code) {
24 case PCMK_OCF_OK:
25 return "ok";
26 case PCMK_OCF_UNKNOWN_ERROR:
27 return "error";
28 case PCMK_OCF_INVALID_PARAM:
29 return "invalid parameter";
30 case PCMK_OCF_UNIMPLEMENT_FEATURE:
31 return "unimplemented feature";
32 case PCMK_OCF_INSUFFICIENT_PRIV:
33 return "insufficient privileges";
34 case PCMK_OCF_NOT_INSTALLED:
35 return "not installed";
36 case PCMK_OCF_NOT_CONFIGURED:
37 return "not configured";
38 case PCMK_OCF_NOT_RUNNING:
39 return "not running";
40 case PCMK_OCF_RUNNING_PROMOTED:
41 return "promoted";
42 case PCMK_OCF_FAILED_PROMOTED:
43 return "promoted (failed)";
44 case PCMK_OCF_DEGRADED:
45 return "OCF_DEGRADED";
46 case PCMK_OCF_DEGRADED_PROMOTED:
47 return "promoted (degraded)";
48 default:
49 return "unknown";
50 }
51 }
52
53 # ifdef __cplusplus
54 }
55 # endif
56
57 #endif