bigbiff bigbiff | e60683a | 2013-02-22 20:55:50 -0500 | [diff] [blame] | 1 | #ifndef UTIL_LINUX_PATH_H |
| 2 | #define UTIL_LINUX_PATH_H |
| 3 | |
| 4 | #include <stdio.h> |
| 5 | #include <stdint.h> |
| 6 | |
| 7 | extern FILE *path_fopen(const char *mode, int exit_on_err, const char *path, ...) |
| 8 | __attribute__ ((__format__ (__printf__, 3, 4))); |
| 9 | extern void path_read_str(char *result, size_t len, const char *path, ...) |
| 10 | __attribute__ ((__format__ (__printf__, 3, 4))); |
| 11 | extern int path_write_str(const char *str, const char *path, ...) |
| 12 | __attribute__ ((__format__ (__printf__, 2, 3))); |
| 13 | extern int path_read_s32(const char *path, ...) |
| 14 | __attribute__ ((__format__ (__printf__, 1, 2))); |
| 15 | extern uint64_t path_read_u64(const char *path, ...) |
| 16 | __attribute__ ((__format__ (__printf__, 1, 2))); |
| 17 | |
| 18 | extern int path_exist(const char *path, ...) |
| 19 | __attribute__ ((__format__ (__printf__, 1, 2))); |
| 20 | |
| 21 | #ifdef HAVE_CPU_SET_T |
| 22 | # include "cpuset.h" |
| 23 | |
| 24 | extern cpu_set_t *path_read_cpuset(int, const char *path, ...) |
| 25 | __attribute__ ((__format__ (__printf__, 2, 3))); |
| 26 | extern cpu_set_t *path_read_cpulist(int, const char *path, ...) |
| 27 | __attribute__ ((__format__ (__printf__, 2, 3))); |
| 28 | extern void path_set_prefix(const char *); |
| 29 | #endif /* HAVE_CPU_SET_T */ |
| 30 | |
| 31 | #endif /* UTIL_LINUX_PATH_H */ |