pacemaker  2.1.1-52dc28db4
Scalable High-Availability cluster resource manager
Macros | Functions
results.c File Reference
#include <crm_internal.h>
#include <bzlib.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <qb/qbdefs.h>
#include <crm/common/mainloop.h>
#include <crm/common/xml.h>
Include dependency graph for results.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 
#define PCMK__N_RC   (sizeof(pcmk__rcs) / sizeof(struct pcmk__rc_info))
 

Functions

const char * pcmk_errorname (int rc)
 
const char * pcmk_strerror (int rc)
 
const char * pcmk_rc_name (int rc)
 Get a return code constant name as a string. More...
 
const char * pcmk_rc_str (int rc)
 Get a user-friendly description of a return code. More...
 
int pcmk_rc2legacy (int rc)
 
int pcmk_legacy2rc (int legacy_rc)
 
const char * crm_exit_name (crm_exit_t exit_code)
 
const char * crm_exit_str (crm_exit_t exit_code)
 
crm_exit_t crm_errno2exit (int rc)
 
crm_exit_t pcmk_rc2exitc (int rc)
 Map a function return code to the most similar exit code. More...
 
const char * bz2_strerror (int rc)
 
crm_exit_t crm_exit (crm_exit_t rc)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 13 of file results.c.

◆ PCMK__N_RC

#define PCMK__N_RC   (sizeof(pcmk__rcs) / sizeof(struct pcmk__rc_info))

Definition at line 256 of file results.c.

Function Documentation

◆ bz2_strerror()

const char* bz2_strerror ( int  rc)

Definition at line 726 of file results.c.

◆ crm_errno2exit()

crm_exit_t crm_errno2exit ( int  rc)
Deprecated:
Use standard return codes and pcmk_rc2exitc() instead

Definition at line 577 of file results.c.

◆ crm_exit()

crm_exit_t crm_exit ( crm_exit_t  rc)

Definition at line 759 of file results.c.

◆ crm_exit_name()

const char* crm_exit_name ( crm_exit_t  exit_code)

Definition at line 479 of file results.c.

◆ crm_exit_str()

const char* crm_exit_str ( crm_exit_t  exit_code)

Definition at line 526 of file results.c.

◆ pcmk_errorname()

const char* pcmk_errorname ( int  rc)
Deprecated:
Use standard return codes and pcmk_rc_name() instead

Definition at line 32 of file results.c.

◆ pcmk_legacy2rc()

int pcmk_legacy2rc ( int  legacy_rc)
Deprecated:
Use standard return codes instead

Definition at line 450 of file results.c.

◆ pcmk_rc2exitc()

crm_exit_t pcmk_rc2exitc ( int  rc)

Map a function return code to the most similar exit code.

Parameters
[in]rcFunction return code
Returns
Most similar exit code

Definition at line 620 of file results.c.

◆ pcmk_rc2legacy()

int pcmk_rc2legacy ( int  rc)
Deprecated:
Use standard return codes instead

Definition at line 437 of file results.c.

◆ pcmk_rc_name()

const char* pcmk_rc_name ( int  rc)

Get a return code constant name as a string.

Parameters
[in]rcInteger return code to convert
Returns
String of constant name corresponding to rc

Definition at line 266 of file results.c.

◆ pcmk_rc_str()

const char* pcmk_rc_str ( int  rc)

Get a user-friendly description of a return code.

Parameters
[in]rcInteger return code to convert
Returns
String description of rc

Definition at line 420 of file results.c.

◆ pcmk_strerror()

const char* pcmk_strerror ( int  rc)
Deprecated:
Use standard return codes and pcmk_rc_str() instead

Definition at line 58 of file results.c.