blob: 45da692f8169e929cb4214c5f9ea49add12f2d24 [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
bigbiff7b4c7a62015-01-01 19:44:14 -05007extern char *path_strdup(const char *path, ...)
8 __attribute__ ((__format__ (__printf__, 1, 2)));
bigbiff bigbiffe60683a2013-02-22 20:55:50 -05009extern FILE *path_fopen(const char *mode, int exit_on_err, const char *path, ...)
10 __attribute__ ((__format__ (__printf__, 3, 4)));
11extern void path_read_str(char *result, size_t len, const char *path, ...)
12 __attribute__ ((__format__ (__printf__, 3, 4)));
13extern int path_write_str(const char *str, const char *path, ...)
14 __attribute__ ((__format__ (__printf__, 2, 3)));
15extern int path_read_s32(const char *path, ...)
16 __attribute__ ((__format__ (__printf__, 1, 2)));
17extern uint64_t path_read_u64(const char *path, ...)
18 __attribute__ ((__format__ (__printf__, 1, 2)));
19
20extern int path_exist(const char *path, ...)
21 __attribute__ ((__format__ (__printf__, 1, 2)));
22
23#ifdef HAVE_CPU_SET_T
24# include "cpuset.h"
25
26extern cpu_set_t *path_read_cpuset(int, const char *path, ...)
27 __attribute__ ((__format__ (__printf__, 2, 3)));
28extern cpu_set_t *path_read_cpulist(int, const char *path, ...)
29 __attribute__ ((__format__ (__printf__, 2, 3)));
30extern void path_set_prefix(const char *);
31#endif /* HAVE_CPU_SET_T */
32
33#endif /* UTIL_LINUX_PATH_H */