2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include "namespace.h"
|
|
|
|
#include <lib.h>
|
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
#include <string.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/statvfs.h>
|
|
|
|
|
2013-12-06 12:04:52 +01:00
|
|
|
#if defined(__weak_alias)
|
2011-02-17 18:11:09 +01:00
|
|
|
__weak_alias(fstatvfs, _fstatvfs)
|
|
|
|
#endif
|
|
|
|
|
2013-08-20 01:28:23 +02:00
|
|
|
int fstatvfs1(int fd, struct statvfs *buffer, int flags)
|
2011-02-17 18:11:09 +01:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
memset(&m, 0, sizeof(m));
|
|
|
|
m.VFS_STATVFS1_FD = fd;
|
|
|
|
m.VFS_STATVFS1_BUF = (char *) buffer;
|
|
|
|
m.VFS_STATVFS1_FLAGS = flags;
|
|
|
|
return(_syscall(VFS_PROC_NR, VFS_FSTATVFS1, &m));
|
2013-08-20 01:28:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int fstatvfs(int fd, struct statvfs *buffer)
|
|
|
|
{
|
|
|
|
return fstatvfs1(fd, buffer, ST_WAIT);
|
2011-02-17 18:11:09 +01:00
|
|
|
}
|