Blame src/api/sys_statvfs.c
|
nsz |
6a2161 |
#include <sys/statvfs.h>
|
|
nsz |
6a2161 |
#define T(t) (t*)0;
|
|
nsz |
6a2161 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
6a2161 |
#define C(n) switch(n){case n:;}
|
|
nsz |
6a2161 |
static void f()
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
T(fsblkcnt_t)
|
|
nsz |
6a2161 |
T(fsfilcnt_t)
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
struct statvfs x;
|
|
nsz |
6a2161 |
F(unsigned long, f_bsize)
|
|
nsz |
6a2161 |
F(unsigned long, f_frsize)
|
|
nsz |
6a2161 |
F(fsblkcnt_t,f_blocks)
|
|
nsz |
6a2161 |
F(fsblkcnt_t,f_bfree)
|
|
nsz |
6a2161 |
F(fsblkcnt_t,f_bavail)
|
|
nsz |
6a2161 |
F(fsfilcnt_t,f_files)
|
|
nsz |
6a2161 |
F(fsfilcnt_t,f_ffree)
|
|
nsz |
6a2161 |
F(fsfilcnt_t,f_favail)
|
|
nsz |
6a2161 |
F(unsigned long, f_fsid)
|
|
nsz |
6a2161 |
F(unsigned long, f_flag)
|
|
nsz |
6a2161 |
F(unsigned long, f_namemax)
|
|
nsz |
6a2161 |
}
|
|
nsz |
6a2161 |
C(ST_RDONLY)
|
|
nsz |
6a2161 |
C(ST_NOSUID)
|
|
nsz |
0ef264 |
{int(*p)(int,struct statvfs*) = fstatvfs;}
|
|
nsz |
0ef264 |
{int(*p)(const char*restrict,struct statvfs*restrict) = statvfs;}
|
|
nsz |
6a2161 |
}
|