pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Macros | Functions
util_compat.h File Reference

Deprecated Pacemaker utilities. More...

#include <glib.h>
#include <libxml/tree.h>
#include <crm/common/util.h>
Include dependency graph for util_compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define crm_get_interval   crm_parse_interval_spec
 
#define CRM_DEFAULT_OP_TIMEOUT_S   "20s"
 
#define safe_str_eq(a, b)   crm_str_eq(a, b, FALSE)
 
#define crm_atoi(text, default_text)   crm_parse_int(text, default_text)
 
#define crm_str_hash   g_str_hash_traditional
 

Functions

gboolean crm_str_eq (const char *a, const char *b, gboolean use_case)
 
gboolean safe_str_neq (const char *a, const char *b)
 
char * crm_itoa_stack (int an_int, char *buf, size_t len)
 
int pcmk_scan_nvpair (const char *input, char **name, char **value)
 
char * pcmk_format_nvpair (const char *name, const char *value, const char *units)
 
const char * crm_xml_replace (xmlNode *node, const char *name, const char *value)
 
char * pcmk_format_named_time (const char *name, time_t epoch_time)
 
long long crm_parse_ll (const char *text, const char *default_text)
 
int crm_parse_int (const char *text, const char *default_text)
 
guint g_str_hash_traditional (gconstpointer v)
 
gboolean crm_strcase_equal (gconstpointer a, gconstpointer b)
 
guint crm_strcase_hash (gconstpointer v)
 
GHashTable * crm_str_table_dup (GHashTable *old_table)
 
char * crm_strip_trailing_newline (char *str)
 
int pcmk_numeric_strcasecmp (const char *s1, const char *s2)
 
void crm_build_path (const char *path_c, mode_t mode)
 
char * score2char (int score)
 
char * score2char_stack (int score, char *buf, size_t len)
 

Detailed Description

Deprecated Pacemaker utilities.

Deprecated:
Do not include this header directly. The utilities in this header, and the header itself, will be removed in a future release.

Definition in file util_compat.h.

Macro Definition Documentation

◆ crm_atoi

#define crm_atoi (   text,
  default_text 
)    crm_parse_int(text, default_text)
Deprecated:
Use strtoll() instead

Definition at line 89 of file util_compat.h.

◆ CRM_DEFAULT_OP_TIMEOUT_S

#define CRM_DEFAULT_OP_TIMEOUT_S   "20s"
Deprecated:
Do not use

Definition at line 34 of file util_compat.h.

◆ crm_get_interval

#define crm_get_interval   crm_parse_interval_spec
Deprecated:
Use crm_parse_interval_spec() instead

Definition at line 31 of file util_compat.h.

◆ crm_str_hash

#define crm_str_hash   g_str_hash_traditional
Deprecated:
Use g_str_hash() instead

Definition at line 95 of file util_compat.h.

◆ safe_str_eq

#define safe_str_eq (   a,
 
)    crm_str_eq(a, b, FALSE)
Deprecated:
Use strcasecmp() instead

Definition at line 64 of file util_compat.h.

Function Documentation

◆ crm_build_path()

void crm_build_path ( const char *  path_c,
mode_t  mode 
)
Deprecated:
Do not use Pacemaker libraries for generic I/O

Definition at line 658 of file io.c.

◆ crm_itoa_stack()

char* crm_itoa_stack ( int  an_int,
char *  buf,
size_t  len 
)
Deprecated:
Use snprintf() instead

Definition at line 1276 of file strings.c.

◆ crm_parse_int()

int crm_parse_int ( const char *  text,
const char *  default_text 
)
Deprecated:
Use strtoll() instead

Definition at line 1326 of file strings.c.

◆ crm_parse_ll()

long long crm_parse_ll ( const char *  text,
const char *  default_text 
)
Deprecated:
Use strtoll() instead

Definition at line 1309 of file strings.c.

◆ crm_str_eq()

gboolean crm_str_eq ( const char *  a,
const char *  b,
gboolean  use_case 
)
Deprecated:
Use strcmp() or strcasecmp() instead

Definition at line 1256 of file strings.c.

◆ crm_str_table_dup()

GHashTable* crm_str_table_dup ( GHashTable *  old_table)
Deprecated:
Do not use Pacemaker for generic hash table manipulation

Definition at line 1303 of file strings.c.

◆ crm_strcase_equal()

gboolean crm_strcase_equal ( gconstpointer  a,
gconstpointer  b 
)
Deprecated:
Do not use Pacemaker for generic string comparison

Definition at line 1291 of file strings.c.

◆ crm_strcase_hash()

guint crm_strcase_hash ( gconstpointer  v)
Deprecated:
Do not use Pacemaker for generic string manipulation

Definition at line 1297 of file strings.c.

◆ crm_strip_trailing_newline()

char* crm_strip_trailing_newline ( char *  str)
Deprecated:
Don't use Pacemaker for string manipulation

Definition at line 1351 of file strings.c.

◆ crm_xml_replace()

const char* crm_xml_replace ( xmlNode *  node,
const char *  name,
const char *  value 
)
Deprecated:
Use crm_xml_add() or xml_remove_prop() instead

Definition at line 943 of file nvpair.c.

◆ g_str_hash_traditional()

guint g_str_hash_traditional ( gconstpointer  v)
Deprecated:
Use g_str_hash() instead

Definition at line 1285 of file strings.c.

◆ pcmk_format_named_time()

char* pcmk_format_named_time ( const char *  name,
time_t  epoch_time 
)
Deprecated:
Use a standard printf()-style function instead

Definition at line 933 of file nvpair.c.

◆ pcmk_format_nvpair()

char* pcmk_format_nvpair ( const char *  name,
const char *  value,
const char *  units 
)
Deprecated:
Use a standard printf()-style function instead

Definition at line 926 of file nvpair.c.

◆ pcmk_numeric_strcasecmp()

int pcmk_numeric_strcasecmp ( const char *  s1,
const char *  s2 
)
Deprecated:
Don't use Pacemaker for string manipulation

Definition at line 1357 of file strings.c.

◆ pcmk_scan_nvpair()

int pcmk_scan_nvpair ( const char *  input,
char **  name,
char **  value 
)
Deprecated:
Use sscanf() instead

Definition at line 920 of file nvpair.c.

◆ safe_str_neq()

gboolean safe_str_neq ( const char *  a,
const char *  b 
)
Deprecated:
Use strcmp() instead

Definition at line 1241 of file strings.c.

◆ score2char()

char* score2char ( int  score)
Deprecated:
Use pcmk_readable_score() instead

Definition at line 148 of file scores.c.

◆ score2char_stack()

char* score2char_stack ( int  score,
char *  buf,
size_t  len 
)
Deprecated:
Use pcmk_readable_score() instead

Definition at line 157 of file scores.c.