pacemaker  1.1.16-94ff4df
Scalable High-Availability cluster resource manager
Functions
internal.h File Reference

internal common utilities More...

#include <glib.h>
#include <dirent.h>
#include <sys/types.h>
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * generate_series_filename (const char *directory, const char *series, int sequence, gboolean bzip)
 
int get_last_sequence (const char *directory, const char *series)
 
void write_last_sequence (const char *directory, const char *series, int sequence, int max)
 
int crm_chown_last_sequence (const char *directory, const char *series, uid_t uid, gid_t gid)
 
gboolean crm_is_writable (const char *dir, const char *file, const char *user, const char *group, gboolean need_both)
 
void crm_sync_directory (const char *name)
 
char * crm_read_contents (const char *filename)
 
int crm_write_sync (int fd, const char *contents)
 
int crm_procfs_process_info (struct dirent *entry, char *name, int *pid)
 
int crm_procfs_pid_of (const char *name)
 
void crm_schema_init (void)
 
void crm_schema_cleanup (void)
 
char * crm_concat (const char *prefix, const char *suffix, char join)
 
void g_hash_destroy_str (gpointer data)
 
long long crm_int_helper (const char *text, char **end_text)
 
gboolean crm_ends_with (const char *s, const char *match)
 
char * add_list_element (char *list, const char *value)
 
bool crm_compress_string (const char *data, int length, int max, char **result, unsigned int *result_len)
 

Detailed Description

internal common utilities

Note
Public APIs are declared in util.h

Definition in file internal.h.

Function Documentation

§ add_list_element()

char* add_list_element ( char *  list,
const char *  value 
)

Definition at line 292 of file strings.c.

§ crm_chown_last_sequence()

int crm_chown_last_sequence ( const char *  directory,
const char *  series,
uid_t  uid,
gid_t  gid 
)

Definition at line 250 of file io.c.

§ crm_compress_string()

bool crm_compress_string ( const char *  data,
int  length,
int  max,
char **  result,
unsigned int *  result_len 
)

Definition at line 311 of file strings.c.

§ crm_concat()

char* crm_concat ( const char *  prefix,
const char *  suffix,
char  join 
)

Definition at line 32 of file strings.c.

§ crm_ends_with()

gboolean crm_ends_with ( const char *  s,
const char *  match 
)

Definition at line 242 of file strings.c.

§ crm_int_helper()

long long crm_int_helper ( const char *  text,
char **  end_text 
)

Definition at line 80 of file strings.c.

§ crm_is_writable()

gboolean crm_is_writable ( const char *  dir,
const char *  file,
const char *  user,
const char *  group,
gboolean  need_both 
)

Definition at line 278 of file io.c.

§ crm_procfs_pid_of()

int crm_procfs_pid_of ( const char *  name)

Definition at line 117 of file procfs.c.

§ crm_procfs_process_info()

int crm_procfs_process_info ( struct dirent *  entry,
char *  name,
int *  pid 
)

Definition at line 46 of file procfs.c.

§ crm_read_contents()

char* crm_read_contents ( const char *  filename)

Definition at line 394 of file io.c.

§ crm_schema_cleanup()

void crm_schema_cleanup ( void  )

Definition at line 462 of file schemas.c.

§ crm_schema_init()

void crm_schema_init ( void  )

Definition at line 241 of file schemas.c.

§ crm_sync_directory()

void crm_sync_directory ( const char *  name)

Definition at line 357 of file io.c.

§ crm_write_sync()

int crm_write_sync ( int  fd,
const char *  contents 
)

Definition at line 440 of file io.c.

§ g_hash_destroy_str()

void g_hash_destroy_str ( gpointer  data)

Definition at line 74 of file strings.c.

§ generate_series_filename()

char* generate_series_filename ( const char *  directory,
const char *  series,
int  sequence,
gboolean  bzip 
)

Definition at line 85 of file io.c.

§ get_last_sequence()

int get_last_sequence ( const char *  directory,
const char *  series 
)

Definition at line 121 of file io.c.

§ write_last_sequence()

void write_last_sequence ( const char *  directory,
const char *  series,
int  sequence,
int  max 
)

Definition at line 193 of file io.c.