pacemaker  2.0.4-2deceaa
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
io.c File Reference
#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 <errno.h>
#include <limits.h>
#include <pwd.h>
#include <grp.h>
#include <crm/crm.h>
#include <crm/common/util.h>
Include dependency graph for io.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 

Functions

int pcmk__build_path (const char *path_c, mode_t mode)
 
void crm_build_path (const char *path_c, mode_t mode)
 Create a directory, including any parent directories needed. More...
 
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)
 
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 pcmk__close_fds_in_child (bool all)
 

Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 13 of file io.c.

Function Documentation

void crm_build_path ( const char *  path_c,
mode_t  mode 
)

Create a directory, including any parent directories needed.

Parameters
[in]path_cPathname of the directory to create
[in]modePermissions to be used (with current umask) when creating
Note
This logs errors but does not return them to the caller.

Definition at line 81 of file io.c.

int pcmk__build_path ( const char *  path_c,
mode_t  mode 
)

Definition at line 45 of file io.c.

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

Definition at line 256 of file io.c.

void pcmk__close_fds_in_child ( bool  all)

Definition at line 577 of file io.c.

bool pcmk__daemon_can_write ( const char *  dir,
const char *  file 
)

Definition at line 346 of file io.c.

int pcmk__file_contents ( const char *  filename,
char **  contents 
)

Definition at line 450 of file io.c.

const char* pcmk__get_tmpdir ( void  )

Definition at line 559 of file io.c.

int pcmk__read_series_sequence ( const char *  directory,
const char *  series,
unsigned int *  seq 
)

Definition at line 159 of file io.c.

int pcmk__real_path ( const char *  path,
char **  resolved_path 
)

Definition at line 104 of file io.c.

char* pcmk__series_filename ( const char *  directory,
const char *  series,
int  sequence,
bool  bzip 
)

Definition at line 140 of file io.c.

int pcmk__set_nonblocking ( int  fd)

Definition at line 536 of file io.c.

void pcmk__sync_directory ( const char *  name)

Definition at line 414 of file io.c.

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

Definition at line 206 of file io.c.

int pcmk__write_sync ( int  fd,
const char *  contents 
)

Definition at line 506 of file io.c.