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