Go to the source code of this file.
|
#define | LOG_DEBUG_2 LOG_TRACE |
|
#define | LOG_DEBUG_3 LOG_TRACE |
|
#define | LOG_DEBUG_4 LOG_TRACE |
|
#define | LOG_DEBUG_5 LOG_TRACE |
|
#define | LOG_DEBUG_6 LOG_TRACE |
|
#define | XML_CIB_ATTR_HASTATE "ha" |
|
#define | XML_CIB_ATTR_JOINSTATE XML_NODE_JOIN_STATE |
|
#define | XML_CIB_ATTR_EXPSTATE XML_NODE_EXPECTED |
|
#define | XML_CIB_ATTR_INCCM XML_NODE_IN_CLUSTER |
|
#define | XML_CIB_ATTR_CRMDSTATE XML_NODE_IS_PEER |
|
#define | CRMD_STATE_ACTIVE CRMD_JOINSTATE_MEMBER |
|
#define | CRMD_STATE_INACTIVE CRMD_JOINSTATE_DOWN |
|
#define | pcmk_err_dtd_validation pcmk_err_schema_validation |
|
#define | stonith_error2string pcmk_strerror |
|
#define | lrmd_error2string pcmk_strerror |
|
#define | cib_error2string pcmk_strerror |
|
#define | crm_strdup strdup |
|
#define | set_bit_inplace set_bit |
|
#define | clear_bit_inplace clear_bit |
|
#define | crm_malloc0(malloc_obj, length) |
|
#define | crm_malloc(malloc_obj, length) |
|
#define | crm_realloc(realloc_obj, length) |
|
#define | crm_free(free_obj) do { free(free_obj); free_obj=NULL; } while(0) |
|
#define | xml_child_iter(parent, child, code) |
|
#define | xml_child_iter_filter(parent, child, filter, code) |
|
#define | xml_prop_iter(parent, prop_name, prop_value, code) |
|
#define | xml_prop_name_iter(parent, prop_name, code) |
|
#define | zap_xml_from_parent(parent, xml_obj) free_xml(xml_obj); xml_obj = NULL |
|
#define | slist_destroy(child_type, child, parent, a) |
|
|
enum | cib_errors {
cib_ok = pcmk_ok,
cib_operation = -EINVAL,
cib_create_msg = -EPROTO,
cib_not_connected = -ENOTCONN,
cib_not_authorized = -EACCES,
cib_send_failed = -ECOMM,
cib_reply_failed = -ENOMSG,
cib_return_code = -EPROTO,
cib_output_data = -ENOMSG,
cib_connection = -ENOTCONN,
cib_authentication = -EPROTO,
cib_missing = -EINVAL,
cib_variant = -EPROTONOSUPPORT,
CIBRES_MISSING_FIELD = -EINVAL,
cib_unknown = -EINVAL,
cib_STALE = -ENOKEY,
cib_EXISTS = -ENOTUNIQ,
cib_NOTEXISTS = -ENXIO,
cib_ACTIVATION = -ENODATA,
cib_NOOBJECT = -EINVAL,
cib_NOPARENT = -EINVAL,
cib_NOTSUPPORTED = -EPROTONOSUPPORT,
cib_registration_msg = -EPROTO,
cib_callback_token = -EPROTO,
cib_callback_register = -ECOMM,
cib_client_gone = -ECONNRESET,
cib_not_master = -EPERM,
cib_missing_data = -EINVAL,
cib_remote_timeout = -ETIME,
cib_no_quorum = -pcmk_err_no_quorum,
cib_diff_failed = -pcmk_err_diff_failed,
cib_diff_resync = -pcmk_err_diff_resync,
cib_old_data = -pcmk_err_old_data,
cib_dtd_validation = -pcmk_err_schema_validation,
cib_bad_section = -EINVAL,
cib_bad_permissions = -EACCES,
cib_invalid_argument = -EINVAL,
cib_transform_failed = -pcmk_err_transform_failed,
cib_permission_denied = -EACCES
} |
|
enum | stonith_errors {
stonith_ok = pcmk_ok,
stonith_pending = -EINPROGRESS,
st_err_generic = -pcmk_err_generic,
st_err_internal = -EPROTO,
st_err_not_supported = -EPROTONOSUPPORT,
st_err_connection = -ENOTCONN,
st_err_missing = -EINVAL,
st_err_exists = -ENOTUNIQ,
st_err_timeout = -ETIME,
st_err_ipc = -ECOMM,
st_err_peer = -ENOMSG,
st_err_unknown_operation = -EOPNOTSUPP,
st_err_unknown_device = -ENODEV,
st_err_none_available = -EHOSTUNREACH,
st_err_signal = -ECONNABORTED,
st_err_agent_fork = -ECHILD,
st_err_agent_args = -EREMOTEIO,
st_err_agent = -ECONNABORTED,
st_err_invalid_level = -EINVAL
} |
|
enum | lrmd_errors {
lrmd_ok = pcmk_ok,
lrmd_pending = -EINPROGRESS,
lrmd_err_generic = -EPROTONOSUPPORT,
lrmd_err_internal = -EPROTO,
lrmd_err_connection = -ENOTCONN,
lrmd_err_missing = -EINVAL,
lrmd_err_ipc = -ECOMM,
lrmd_err_peer = -ENOMSG,
lrmd_err_unknown_operation = -EOPNOTSUPP,
lrmd_err_unknown_rsc = -ENODEV,
lrmd_err_no_metadata = -EIO,
lrmd_err_stonith_connection = -EUNATCH,
lrmd_err_provider_required = -EINVAL
} |
|
◆ cib_error2string
◆ clear_bit_inplace
◆ crm_free
#define crm_free |
( |
|
free_obj | ) |
do { free(free_obj); free_obj=NULL; } while(0) |
◆ crm_malloc
#define crm_malloc |
( |
|
malloc_obj, |
|
|
|
length |
|
) |
| |
Value:do { \
malloc_obj = malloc(length); \
if(malloc_obj == NULL) { \
crm_err("Failed allocation of %lu bytes", (unsigned long)length); \
CRM_ASSERT(malloc_obj != NULL); \
} \
} while(0)
Definition at line 148 of file compatibility.h.
◆ crm_malloc0
#define crm_malloc0 |
( |
|
malloc_obj, |
|
|
|
length |
|
) |
| |
Value:do { \
malloc_obj = malloc(length); \
if(malloc_obj == NULL) { \
crm_err("Failed allocation of %lu bytes", (unsigned long)length); \
CRM_ASSERT(malloc_obj != NULL); \
} \
memset(malloc_obj, 0, length); \
} while(0)
Definition at line 139 of file compatibility.h.
◆ crm_realloc
#define crm_realloc |
( |
|
realloc_obj, |
|
|
|
length |
|
) |
| |
Value:do { \
realloc_obj = realloc(realloc_obj, length); \
CRM_ASSERT(realloc_obj != NULL); \
} while(0)
Definition at line 156 of file compatibility.h.
◆ crm_strdup
#define crm_strdup strdup |
◆ CRMD_STATE_ACTIVE
◆ CRMD_STATE_INACTIVE
◆ LOG_DEBUG_2
◆ LOG_DEBUG_3
◆ LOG_DEBUG_4
◆ LOG_DEBUG_5
◆ LOG_DEBUG_6
◆ lrmd_error2string
◆ pcmk_err_dtd_validation
◆ set_bit_inplace
◆ slist_destroy
#define slist_destroy |
( |
|
child_type, |
|
|
|
child, |
|
|
|
parent, |
|
|
|
a |
|
) |
| |
Value:do { \
GListPtr __crm_iter_head = parent; \
child_type *child = NULL; \
while(__crm_iter_head != NULL) { \
child = (child_type *) __crm_iter_head->data; \
__crm_iter_head = __crm_iter_head->next; \
{ a; } \
} \
g_list_free(parent); \
} while(0)
Definition at line 251 of file compatibility.h.
◆ stonith_error2string
◆ xml_child_iter
#define xml_child_iter |
( |
|
parent, |
|
|
|
child, |
|
|
|
code |
|
) |
| |
Value:do { \
if(parent != NULL) { \
xmlNode *child = NULL; \
xmlNode *__crm_xml_iter = parent->children; \
while(__crm_xml_iter != NULL) { \
child = __crm_xml_iter; \
__crm_xml_iter = __crm_xml_iter->next; \
if(child->type == XML_ELEMENT_NODE) { \
code; \
} \
} \
} \
} while(0)
Definition at line 167 of file compatibility.h.
◆ xml_child_iter_filter
#define xml_child_iter_filter |
( |
|
parent, |
|
|
|
child, |
|
|
|
filter, |
|
|
|
code |
|
) |
| |
Value:do { \
if(parent != NULL) { \
xmlNode *child = NULL; \
xmlNode *__crm_xml_iter = parent->children; \
while(__crm_xml_iter != NULL) { \
child = __crm_xml_iter; \
__crm_xml_iter = __crm_xml_iter->next; \
if(child->type == XML_ELEMENT_NODE) { \
if(filter == NULL \
||
crm_str_eq(filter, (
const char *)child->name, TRUE)) { \
code; \
} \
} \
} \
} \
} while(0)
gboolean crm_str_eq(const char *a, const char *b, gboolean use_case)
Definition at line 181 of file compatibility.h.
◆ XML_CIB_ATTR_CRMDSTATE
◆ XML_CIB_ATTR_EXPSTATE
◆ XML_CIB_ATTR_HASTATE
#define XML_CIB_ATTR_HASTATE "ha" |
◆ XML_CIB_ATTR_INCCM
◆ XML_CIB_ATTR_JOINSTATE
◆ xml_prop_iter
#define xml_prop_iter |
( |
|
parent, |
|
|
|
prop_name, |
|
|
|
prop_value, |
|
|
|
code |
|
) |
| |
Value:do { \
if(parent != NULL) { \
xmlAttrPtr prop_iter = parent->properties; \
const char *prop_name = NULL; \
const char *prop_value = NULL; \
while(prop_iter != NULL) { \
prop_name = (const char *)prop_iter->name; \
prop_iter = prop_iter->next; \
if(prop_name) { \
code; \
} \
} \
} \
} while(0)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
Definition at line 198 of file compatibility.h.
◆ xml_prop_name_iter
#define xml_prop_name_iter |
( |
|
parent, |
|
|
|
prop_name, |
|
|
|
code |
|
) |
| |
Value:do { \
if(parent != NULL) { \
xmlAttrPtr prop_iter = parent->properties; \
const char *prop_name = NULL; \
while(prop_iter != NULL) { \
prop_name = (const char *)prop_iter->name; \
prop_iter = prop_iter->next; \
if(prop_name) { \
code; \
} \
} \
} \
} while(0)
Definition at line 214 of file compatibility.h.
◆ zap_xml_from_parent
#define zap_xml_from_parent |
( |
|
parent, |
|
|
|
xml_obj |
|
) |
| free_xml(xml_obj); xml_obj = NULL |
◆ cib_errors
Enumerator |
---|
cib_ok | |
cib_operation | |
cib_create_msg | |
cib_not_connected | |
cib_not_authorized | |
cib_send_failed | |
cib_reply_failed | |
cib_return_code | |
cib_output_data | |
cib_connection | |
cib_authentication | |
cib_missing | |
cib_variant | |
CIBRES_MISSING_FIELD | |
cib_unknown | |
cib_STALE | |
cib_EXISTS | |
cib_NOTEXISTS | |
cib_ACTIVATION | |
cib_NOOBJECT | |
cib_NOPARENT | |
cib_NOTSUPPORTED | |
cib_registration_msg | |
cib_callback_token | |
cib_callback_register | |
cib_client_gone | |
cib_not_master | |
cib_missing_data | |
cib_remote_timeout | |
cib_no_quorum | |
cib_diff_failed | |
cib_diff_resync | |
cib_old_data | |
cib_dtd_validation | |
cib_bad_section | |
cib_bad_permissions | |
cib_invalid_argument | |
cib_transform_failed | |
cib_permission_denied | |
Definition at line 38 of file compatibility.h.
◆ lrmd_errors
Enumerator |
---|
lrmd_ok | |
lrmd_pending | |
lrmd_err_generic | |
lrmd_err_internal | |
lrmd_err_connection | |
lrmd_err_missing | |
lrmd_err_ipc | |
lrmd_err_peer | |
lrmd_err_unknown_operation | |
lrmd_err_unknown_rsc | |
lrmd_err_no_metadata | |
lrmd_err_stonith_connection | |
lrmd_err_provider_required | |
Definition at line 103 of file compatibility.h.
◆ stonith_errors
Enumerator |
---|
stonith_ok | |
stonith_pending | |
st_err_generic | |
st_err_internal | |
st_err_not_supported | |
st_err_connection | |
st_err_missing | |
st_err_exists | |
st_err_timeout | |
st_err_ipc | |
st_err_peer | |
st_err_unknown_operation | |
st_err_unknown_device | |
st_err_none_available | |
st_err_signal | |
st_err_agent_fork | |
st_err_agent_args | |
st_err_agent | |
st_err_invalid_level | |
Definition at line 80 of file compatibility.h.