minix/lib/libc/sys-minix/fstatvfs.c
David van Moolenbroek 8143b9bf1d Implement support for [f]statvfs1(2)
The [f]statvfs(3) calls now use [f]statvfs1(2).

Change-Id: I949c177fc14abf976e45165c342f897f4ec988ee
2014-02-18 11:25:02 +01:00

25 lines
503 B
C

#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>
#include <sys/statvfs.h>
#ifdef __weak_alias
__weak_alias(fstatvfs1, _fstatvfs1)
__weak_alias(fstatvfs, _fstatvfs)
#endif
int fstatvfs1(int fd, struct statvfs *buffer, int flags)
{
message m;
m.VFS_FSTATVFS1_FD = fd;
m.VFS_FSTATVFS1_BUF = (char *) buffer;
m.VFS_FSTATVFS1_FLAGS = flags;
return(_syscall(VFS_PROC_NR, FSTATVFS1, &m));
}
int fstatvfs(int fd, struct statvfs *buffer)
{
return fstatvfs1(fd, buffer, ST_WAIT);
}