|
char * | pcmk_promotion_score_name (const char *rsc_id) |
| Return the name of the node attribute used as a promotion score. More...
|
|
int | crm_default_remote_port (void) |
| Get the default remote connection TCP port on this host. More...
|
|
const char * | pcmk_readable_score (int score) |
| Return a displayable static string for a score value. More...
|
|
int | char2score (const char *score) |
| Get the integer value of a score string. More...
|
|
int | pcmk__add_scores (int score1, int score2) |
|
gboolean | crm_is_true (const char *s) |
|
int | crm_str_to_boolean (const char *s, int *ret) |
|
long long | crm_get_msec (const char *input) |
| Parse a time+units string and return milliseconds equivalent. More...
|
|
char * | crm_strip_trailing_newline (char *str) |
|
char * | crm_strdup_printf (char const *format,...) G_GNUC_PRINTF(1 |
|
char guint | crm_parse_interval_spec (const char *input) |
| Parse milliseconds from a Pacemaker interval specification. More...
|
|
int | compare_version (const char *version1, const char *version2) |
|
void | crm_abort (const char *file, const char *function, int line, const char *condition, gboolean do_core, gboolean do_fork) |
|
char * | crm_meta_name (const char *field) |
|
const char * | crm_meta_value (GHashTable *hash, const char *field) |
|
char * | crm_md5sum (const char *buffer) |
|
char * | crm_generate_uuid (void) |
|
bool | crm_is_daemon_name (const char *name) |
| Check whether string represents a client name used by cluster daemons. More...
|
|
int | crm_user_lookup (const char *name, uid_t *uid, gid_t *gid) |
|
int | pcmk_daemon_user (uid_t *uid, gid_t *gid) |
| Get user and group IDs of pacemaker daemon user. More...
|
|
char * | pcmk_hostname (void) |
| Get the local hostname. More...
|
|
bool | pcmk_str_is_infinity (const char *s) |
|
bool | pcmk_str_is_minus_infinity (const char *s) |
|
Utility functions.
Definition in file util.h.
int char2score |
( |
const char * |
score | ) |
|
Get the integer value of a score string.
Given a string representation of a score, return the integer equivalent. This accepts infinity strings as well as red, yellow, and green, and bounds the result to +/-INFINITY.
- Parameters
-
- Returns
- Integer value corresponding to
score
Definition at line 36 of file scores.c.
const char* pcmk_readable_score |
( |
int |
score | ) |
|
Return a displayable static string for a score value.
Given a score value, return a pointer to a static string representation of the score suitable for log messages, output, etc.
- Parameters
-
[in] | score | Score to display |
- Returns
- Pointer to static memory containing string representation of
score
- Note
- Subsequent calls to this function will overwrite the returned value, so it should be used only in a local context such as a printf()-style statement.
Definition at line 86 of file scores.c.