This source file includes following definitions.
- pcmk__open_devnull
1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_IO_INTERNAL__H
11 # define PCMK__CRM_COMMON_IO_INTERNAL__H
12
13 #include <fcntl.h>
14 #include <stdbool.h>
15 #include <unistd.h>
16
17 int pcmk__real_path(const char *path, char **resolved_path);
18
19 char *pcmk__series_filename(const char *directory, const char *series,
20 int sequence, bool bzip);
21 int pcmk__read_series_sequence(const char *directory, const char *series,
22 unsigned int *seq);
23 void pcmk__write_series_sequence(const char *directory, const char *series,
24 unsigned int sequence, int max);
25 int pcmk__chown_series_sequence(const char *directory, const char *series,
26 uid_t uid, gid_t gid);
27
28 int pcmk__build_path(const char *path_c, mode_t mode);
29 char *pcmk__full_path(const char *filename, const char *dirname);
30 bool pcmk__daemon_can_write(const char *dir, const char *file);
31 void pcmk__sync_directory(const char *name);
32
33 int pcmk__file_contents(const char *filename, char **contents);
34 int pcmk__write_sync(int fd, const char *contents);
35 int pcmk__set_nonblocking(int fd);
36 const char *pcmk__get_tmpdir(void);
37
38 void pcmk__close_fds_in_child(bool);
39
40
41
42
43
44
45
46
47
48
49 static inline void
50 pcmk__open_devnull(int flags)
51 {
52
53
54 (void) open("/dev/null", flags);
55 }
56
57 #endif