2013-12-10 00:14:24 +08:00
|
|
|
#ifndef __API_FS__
|
|
|
|
#define __API_FS__
|
2012-09-11 06:14:58 +08:00
|
|
|
|
2015-09-02 15:56:42 +08:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2015-09-02 15:56:37 +08:00
|
|
|
/*
|
|
|
|
* On most systems <limits.h> would have given us this, but not on some systems
|
|
|
|
* (e.g. GNU/Hurd).
|
|
|
|
*/
|
|
|
|
#ifndef PATH_MAX
|
|
|
|
#define PATH_MAX 4096
|
|
|
|
#endif
|
|
|
|
|
2015-09-02 15:56:41 +08:00
|
|
|
#define FS(name) \
|
|
|
|
const char *name##__mountpoint(void); \
|
2015-09-02 15:56:42 +08:00
|
|
|
const char *name##__mount(void); \
|
|
|
|
bool name##__configured(void); \
|
2015-09-02 15:56:41 +08:00
|
|
|
|
|
|
|
FS(sysfs)
|
|
|
|
FS(procfs)
|
|
|
|
FS(debugfs)
|
|
|
|
FS(tracefs)
|
|
|
|
|
|
|
|
#undef FS
|
|
|
|
|
2014-12-12 00:17:46 +08:00
|
|
|
|
|
|
|
int filename__read_int(const char *filename, int *value);
|
2014-12-12 00:37:10 +08:00
|
|
|
int sysctl__read_int(const char *sysctl, int *value);
|
2013-12-10 00:14:24 +08:00
|
|
|
#endif /* __API_FS__ */
|