Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1#ifndef __API_FS__
2#define __API_FS__
3
4#include <stdbool.h>
5
6/*
7 * On most systems <limits.h> would have given us this, but not on some systems
8 * (e.g. GNU/Hurd).
9 */
10#ifndef PATH_MAX
11#define PATH_MAX 4096
12#endif
13
14#define FS(name) \
15 const char *name##__mountpoint(void); \
16 const char *name##__mount(void); \
17 bool name##__configured(void); \
18
19FS(sysfs)
20FS(procfs)
21FS(debugfs)
22FS(tracefs)
23
24#undef FS
25
26
27int filename__read_int(const char *filename, int *value);
28int filename__read_ull(const char *filename, unsigned long long *value);
29
30int sysctl__read_int(const char *sysctl, int *value);
31int sysfs__read_int(const char *entry, int *value);
32int sysfs__read_ull(const char *entry, unsigned long long *value);
33#endif /* __API_FS__ */