2012-11-02 12:07:36 +01:00
|
|
|
#ifndef UTIL_LINUX_PATH_H
|
|
|
|
#define UTIL_LINUX_PATH_H
|
|
|
|
|
2011-09-15 08:52:29 +02:00
|
|
|
#include <stdio.h>
|
2012-11-05 12:28:00 +01:00
|
|
|
#include <stdint.h>
|
2011-09-15 08:52:29 +02:00
|
|
|
|
|
|
|
extern FILE *path_fopen(const char *mode, int exit_on_err, const char *path, ...)
|
|
|
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
2012-11-05 12:23:55 +01:00
|
|
|
extern void path_read_str(char *result, size_t len, const char *path, ...)
|
2011-09-15 08:52:29 +02:00
|
|
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
2012-11-05 12:23:55 +01:00
|
|
|
extern int path_write_str(const char *str, const char *path, ...)
|
2011-09-15 08:52:30 +02:00
|
|
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
2012-11-05 12:23:55 +01:00
|
|
|
extern int path_read_s32(const char *path, ...)
|
2012-11-05 12:28:00 +01:00
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
|
|
|
extern uint64_t path_read_u64(const char *path, ...)
|
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
|
|
|
|
2011-09-15 08:52:29 +02:00
|
|
|
extern int path_exist(const char *path, ...)
|
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
2012-11-02 12:07:36 +01:00
|
|
|
|
|
|
|
#ifdef HAVE_CPU_SET_T
|
|
|
|
# include "cpuset.h"
|
|
|
|
|
2012-11-05 12:23:55 +01:00
|
|
|
extern cpu_set_t *path_read_cpuset(int, const char *path, ...)
|
2011-09-15 08:52:29 +02:00
|
|
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
2012-11-05 12:23:55 +01:00
|
|
|
extern cpu_set_t *path_read_cpulist(int, const char *path, ...)
|
2011-09-15 08:52:29 +02:00
|
|
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
2012-11-05 12:23:55 +01:00
|
|
|
extern void path_set_prefix(const char *);
|
2012-11-02 12:07:36 +01:00
|
|
|
#endif /* HAVE_CPU_SET_T */
|
|
|
|
|
|
|
|
#endif /* UTIL_LINUX_PATH_H */
|