pacemaker  2.1.9-49aab99839
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
 
#define ONLINESTATUS   PCMK_VALUE_ONLINE
 
#define OFFLINESTATUS   PCMK_VALUE_OFFLINE
 

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)
 
guint crm_parse_interval_spec (const char *input)
 
char * pcmk_hostname (void)
 

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 90 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:
Do not use

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 96 of file util_compat.h.

◆ OFFLINESTATUS

#define OFFLINESTATUS   PCMK_VALUE_OFFLINE
Deprecated:
Use PCMK_VALUE_OFFLINE instead

Definition at line 169 of file util_compat.h.

◆ ONLINESTATUS

#define ONLINESTATUS   PCMK_VALUE_ONLINE
Deprecated:
Use PCMK_VALUE_ONLINE instead

Definition at line 166 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 65 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 651 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 1367 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 1417 of file strings.c.

◆ crm_parse_interval_spec()

guint crm_parse_interval_spec ( const char *  input)
Deprecated:
Use pcmk_parse_interval_spec() instead

Definition at line 400 of file utils.c.

◆ crm_parse_ll()

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

Definition at line 1400 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 1347 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 1394 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 1382 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 1388 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 1442 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 1112 of file nvpair.c.

◆ g_str_hash_traditional()

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

Definition at line 1376 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 1102 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 1095 of file nvpair.c.

◆ pcmk_hostname()

char* pcmk_hostname ( void  )
Deprecated:
Use uname() instead

Definition at line 429 of file utils.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 1448 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 1089 of file nvpair.c.

◆ safe_str_neq()

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

Definition at line 1332 of file strings.c.