pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Macros | Typedefs | Enumerations | Functions
cib_file.c File Reference
#include <crm_internal.h>
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <pwd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <glib.h>
#include <crm/crm.h>
#include <crm/cib/internal.h>
#include <crm/msg_xml.h>
#include <crm/common/ipc.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
Include dependency graph for cib_file.c:

Go to the source code of this file.

Macros

#define CIB_SERIES   "cib"
 
#define CIB_SERIES_MAX   100
 
#define CIB_SERIES_BZIP
 
#define CIB_LIVE_NAME   CIB_SERIES ".xml"
 
#define cib_set_file_flags(cibfile, flags_to_set)
 
#define cib_clear_file_flags(cibfile, flags_to_clear)
 

Typedefs

typedef struct cib_file_opaque_s cib_file_opaque_t
 

Enumerations

enum  cib_file_flags { cib_file_flag_dirty = (1 << 0), cib_file_flag_live = (1 << 1) }
 

Functions

cib_tcib_file_new (const char *cib_location)
 
int cib_file_read_and_verify (const char *filename, const char *sigfile, xmlNode **root)
 
int cib_file_write_with_digest (xmlNode *cib_root, const char *cib_dirname, const char *cib_filename)
 

Macro Definition Documentation

◆ cib_clear_file_flags

#define cib_clear_file_flags (   cibfile,
  flags_to_clear 
)
Value:
do { \
(cibfile)->flags = pcmk__clear_flags_as(__func__, __LINE__, \
LOG_TRACE, "CIB file", \
cibfile->filename, \
(cibfile)->flags, \
(flags_to_clear), \
#flags_to_clear); \
} while (0)
#define LOG_TRACE
Definition: logging.h:38
uint64_t flags
Definition: remote.c:215

Definition at line 152 of file cib_file.c.

◆ CIB_LIVE_NAME

#define CIB_LIVE_NAME   CIB_SERIES ".xml"

Definition at line 38 of file cib_file.c.

◆ CIB_SERIES

#define CIB_SERIES   "cib"

Definition at line 32 of file cib_file.c.

◆ CIB_SERIES_BZIP

#define CIB_SERIES_BZIP
Value:
FALSE /* Must be false because archived copies are
created with hard links
*/

Definition at line 34 of file cib_file.c.

◆ CIB_SERIES_MAX

#define CIB_SERIES_MAX   100

Definition at line 33 of file cib_file.c.

◆ cib_set_file_flags

#define cib_set_file_flags (   cibfile,
  flags_to_set 
)
Value:
do { \
(cibfile)->flags = pcmk__set_flags_as(__func__, __LINE__, \
LOG_TRACE, "CIB file", \
cibfile->filename, \
(cibfile)->flags, \
(flags_to_set), \
#flags_to_set); \
} while (0)
#define LOG_TRACE
Definition: logging.h:38
uint64_t flags
Definition: remote.c:215

Definition at line 143 of file cib_file.c.

Typedef Documentation

◆ cib_file_opaque_t

typedef struct cib_file_opaque_s cib_file_opaque_t

Enumeration Type Documentation

◆ cib_file_flags

Enumerator
cib_file_flag_dirty 
cib_file_flag_live 

Definition at line 43 of file cib_file.c.

Function Documentation

◆ cib_file_new()

cib_t* cib_file_new ( const char *  cib_location)

Definition at line 646 of file cib_file.c.

◆ cib_file_read_and_verify()

int cib_file_read_and_verify ( const char *  filename,
const char *  sigfile,
xmlNode **  root 
)

Definition at line 744 of file cib_file.c.

◆ cib_file_write_with_digest()

int cib_file_write_with_digest ( xmlNode *  cib_root,
const char *  cib_dirname,
const char *  cib_filename 
)

Definition at line 918 of file cib_file.c.