#include <crm_internal.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <dirent.h>
#include <pwd.h>
#include <grp.h>
#include <crm/crm.h>
#include <crm/common/util.h>
Go to the source code of this file.
|
void | crm_build_path (const char *path_c, mode_t mode) |
| Create a directory, including any parent directories needed. More...
|
|
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) |
|
bool | pcmk__daemon_can_write (const char *dir, const char *file) |
|
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_set_nonblocking (int fd) |
|
void | pcmk__close_fds_in_child (bool all) |
|
◆ _GNU_SOURCE
Definition at line 11 of file io.c.
◆ crm_build_path()
void crm_build_path |
( |
const char * |
path_c, |
|
|
mode_t |
mode |
|
) |
| |
Create a directory, including any parent directories needed.
- Parameters
-
[in] | path_c | Pathname of the directory to create |
[in] | mode | Permissions to be used (with current umask) when creating |
- Note
- This logs errors but does not return them to the caller.
Definition at line 40 of file io.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 241 of file io.c.
◆ crm_read_contents()
char* crm_read_contents |
( |
const char * |
filename | ) |
|
Definition at line 434 of file io.c.
◆ crm_set_nonblocking()
int crm_set_nonblocking |
( |
int |
fd | ) |
|
Definition at line 510 of file io.c.
◆ crm_sync_directory()
void crm_sync_directory |
( |
const char * |
name | ) |
|
Definition at line 397 of file io.c.
◆ crm_write_sync()
int crm_write_sync |
( |
int |
fd, |
|
|
const char * |
contents |
|
) |
| |
Definition at line 480 of file io.c.
◆ generate_series_filename()
char* generate_series_filename |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
int |
sequence, |
|
|
gboolean |
bzip |
|
) |
| |
Definition at line 76 of file io.c.
◆ get_last_sequence()
int get_last_sequence |
( |
const char * |
directory, |
|
|
const char * |
series |
|
) |
| |
Definition at line 112 of file io.c.
◆ pcmk__close_fds_in_child()
void pcmk__close_fds_in_child |
( |
bool |
all | ) |
|
Definition at line 534 of file io.c.
◆ pcmk__daemon_can_write()
bool pcmk__daemon_can_write |
( |
const char * |
dir, |
|
|
const char * |
file |
|
) |
| |
Definition at line 329 of file io.c.
◆ write_last_sequence()
void write_last_sequence |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
int |
sequence, |
|
|
int |
max |
|
) |
| |
Definition at line 184 of file io.c.