pacemaker  2.1.1-52dc28db4
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_set_file_flags(cibfile, flags_to_set)
 
#define cib_clear_file_flags(cibfile, flags_to_clear)
 
#define CIB_SERIES   "cib"
 
#define CIB_SERIES_MAX   100
 
#define CIB_SERIES_BZIP
 
#define CIB_LIVE_NAME   CIB_SERIES ".xml"
 

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

int cib_file_perform_op (cib_t *cib, const char *op, const char *host, const char *section, xmlNode *data, xmlNode **output_data, int call_options)
 
int cib_file_perform_op_delegate (cib_t *cib, const char *op, const char *host, const char *section, xmlNode *data, xmlNode **output_data, int call_options, const char *user_name)
 
int cib_file_signon (cib_t *cib, const char *name, enum cib_conn_type type)
 
int cib_file_signoff (cib_t *cib)
 
int cib_file_free (cib_t *cib)
 
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)
 
cib_tcib_file_new (const char *cib_location)
 

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:36
uint64_t flags
Definition: remote.c:149

Definition at line 51 of file cib_file.c.

◆ CIB_LIVE_NAME

#define CIB_LIVE_NAME   CIB_SERIES ".xml"

Definition at line 197 of file cib_file.c.

◆ CIB_SERIES

#define CIB_SERIES   "cib"

Definition at line 191 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 193 of file cib_file.c.

◆ CIB_SERIES_MAX

#define CIB_SERIES_MAX   100

Definition at line 192 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:36
uint64_t flags
Definition: remote.c:149

Definition at line 42 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 32 of file cib_file.c.

Function Documentation

◆ cib_file_free()

int cib_file_free ( cib_t cib)

Definition at line 739 of file cib_file.c.

◆ cib_file_new()

cib_t* cib_file_new ( const char *  cib_location)

Definition at line 495 of file cib_file.c.

◆ cib_file_perform_op()

int cib_file_perform_op ( cib_t cib,
const char *  op,
const char *  host,
const char *  section,
xmlNode *  data,
xmlNode **  output_data,
int  call_options 
)

Definition at line 783 of file cib_file.c.

◆ cib_file_perform_op_delegate()

int cib_file_perform_op_delegate ( cib_t cib,
const char *  op,
const char *  host,
const char *  section,
xmlNode *  data,
xmlNode **  output_data,
int  call_options,
const char *  user_name 
)

Definition at line 791 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 141 of file cib_file.c.

◆ cib_file_signoff()

int cib_file_signoff ( cib_t cib)

Definition at line 697 of file cib_file.c.

◆ cib_file_signon()

int cib_file_signon ( cib_t cib,
const char *  name,
enum cib_conn_type  type 
)

Definition at line 582 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 362 of file cib_file.c.