internal common utilities
More...
#include <glib.h>
#include <dirent.h>
#include <sys/types.h>
Go to the source code of this file.
|
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) |
|
internal common utilities
- Note
- Public APIs are declared in util.h
Definition in file internal.h.
char* add_list_element |
( |
char * |
list, |
|
|
const char * |
value |
|
) |
| |
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.
bool crm_compress_string |
( |
const char * |
data, |
|
|
int |
length, |
|
|
int |
max, |
|
|
char ** |
result, |
|
|
unsigned int * |
result_len |
|
) |
| |
char* crm_concat |
( |
const char * |
prefix, |
|
|
const char * |
suffix, |
|
|
char |
join |
|
) |
| |
gboolean crm_ends_with |
( |
const char * |
s, |
|
|
const char * |
match |
|
) |
| |
long long crm_int_helper |
( |
const char * |
text, |
|
|
char ** |
end_text |
|
) |
| |
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.
int crm_procfs_pid_of |
( |
const char * |
name | ) |
|
int crm_procfs_process_info |
( |
struct dirent * |
entry, |
|
|
char * |
name, |
|
|
int * |
pid |
|
) |
| |
char* crm_read_contents |
( |
const char * |
filename | ) |
|
Definition at line 394 of file io.c.
void crm_schema_cleanup |
( |
void |
| ) |
|
void crm_schema_init |
( |
void |
| ) |
|
void crm_sync_directory |
( |
const char * |
name | ) |
|
Definition at line 357 of file io.c.
int crm_write_sync |
( |
int |
fd, |
|
|
const char * |
contents |
|
) |
| |
Definition at line 440 of file io.c.
void g_hash_destroy_str |
( |
gpointer |
data | ) |
|
char* generate_series_filename |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
int |
sequence, |
|
|
gboolean |
bzip |
|
) |
| |
Definition at line 85 of file io.c.
int get_last_sequence |
( |
const char * |
directory, |
|
|
const char * |
series |
|
) |
| |
Definition at line 121 of file io.c.
void write_last_sequence |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
int |
sequence, |
|
|
int |
max |
|
) |
| |
Definition at line 193 of file io.c.