#include <fcntl.h>
#include <stdbool.h>
#include <unistd.h>
Go to the source code of this file.
|
int | pcmk__real_path (const char *path, char **resolved_path) |
|
char * | pcmk__series_filename (const char *directory, const char *series, int sequence, bool bzip) |
|
int | pcmk__read_series_sequence (const char *directory, const char *series, unsigned int *seq) |
|
void | pcmk__write_series_sequence (const char *directory, const char *series, unsigned int sequence, int max) |
|
int | pcmk__chown_series_sequence (const char *directory, const char *series, uid_t uid, gid_t gid) |
|
int | pcmk__build_path (const char *path_c, mode_t mode) |
|
char * | pcmk__full_path (const char *filename, const char *dirname) |
| Duplicate a file path, inserting a prefix if not absolute. More...
|
|
bool | pcmk__daemon_can_write (const char *dir, const char *file) |
|
void | pcmk__sync_directory (const char *name) |
|
int | pcmk__file_contents (const char *filename, char **contents) |
|
int | pcmk__write_sync (int fd, const char *contents) |
|
int | pcmk__set_nonblocking (int fd) |
|
const char * | pcmk__get_tmpdir (void) |
|
void | pcmk__close_fds_in_child (bool) |
|
◆ pcmk__build_path()
int pcmk__build_path |
( |
const char * |
path_c, |
|
|
mode_t |
mode |
|
) |
| |
Definition at line 45 of file io.c.
◆ pcmk__chown_series_sequence()
int pcmk__chown_series_sequence |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
uid_t |
uid, |
|
|
gid_t |
gid |
|
) |
| |
Definition at line 238 of file io.c.
◆ pcmk__close_fds_in_child()
void pcmk__close_fds_in_child |
( |
bool |
| ) |
|
Definition at line 565 of file io.c.
◆ pcmk__daemon_can_write()
bool pcmk__daemon_can_write |
( |
const char * |
dir, |
|
|
const char * |
file |
|
) |
| |
Definition at line 328 of file io.c.
◆ pcmk__file_contents()
int pcmk__file_contents |
( |
const char * |
filename, |
|
|
char ** |
contents |
|
) |
| |
Definition at line 432 of file io.c.
◆ pcmk__full_path()
char* pcmk__full_path |
( |
const char * |
filename, |
|
|
const char * |
dirname |
|
) |
| |
Duplicate a file path, inserting a prefix if not absolute.
- Parameters
-
[in] | filename | File path to duplicate |
[in] | dirname | If filename is not absolute, prefix to add |
- Returns
- Newly allocated memory with full path (guaranteed non-NULL)
Definition at line 634 of file io.c.
◆ pcmk__get_tmpdir()
const char* pcmk__get_tmpdir |
( |
void |
| ) |
|
Definition at line 547 of file io.c.
◆ pcmk__read_series_sequence()
int pcmk__read_series_sequence |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
unsigned int * |
seq |
|
) |
| |
Definition at line 140 of file io.c.
◆ pcmk__real_path()
int pcmk__real_path |
( |
const char * |
path, |
|
|
char ** |
resolved_path |
|
) |
| |
Definition at line 85 of file io.c.
◆ pcmk__series_filename()
char* pcmk__series_filename |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
int |
sequence, |
|
|
bool |
bzip |
|
) |
| |
Definition at line 121 of file io.c.
◆ pcmk__set_nonblocking()
int pcmk__set_nonblocking |
( |
int |
fd | ) |
|
Definition at line 524 of file io.c.
◆ pcmk__sync_directory()
void pcmk__sync_directory |
( |
const char * |
name | ) |
|
Definition at line 396 of file io.c.
◆ pcmk__write_series_sequence()
void pcmk__write_series_sequence |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
unsigned int |
sequence, |
|
|
int |
max |
|
) |
| |
Definition at line 187 of file io.c.
◆ pcmk__write_sync()
int pcmk__write_sync |
( |
int |
fd, |
|
|
const char * |
contents |
|
) |
| |
Definition at line 494 of file io.c.