2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <lib.h>
|
|
|
|
#include "namespace.h"
|
|
|
|
|
2013-12-11 00:47:22 +01:00
|
|
|
#include <sys/types.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/statvfs.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#ifdef __weak_alias
|
|
|
|
__weak_alias(statvfs, _statvfs)
|
|
|
|
#endif
|
|
|
|
|
2013-08-20 01:28:23 +02:00
|
|
|
int statvfs1(const char *name, 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));
|
2013-08-20 01:28:23 +02:00
|
|
|
m.VFS_STATVFS1_LEN = strlen(name) + 1;
|
|
|
|
m.VFS_STATVFS1_NAME = (char *) __UNCONST(name);
|
|
|
|
m.VFS_STATVFS1_BUF = (char *) buffer;
|
|
|
|
m.VFS_STATVFS1_FLAGS = flags;
|
2013-11-04 22:48:08 +01:00
|
|
|
return(_syscall(VFS_PROC_NR, VFS_STATVFS1, &m));
|
2013-08-20 01:28:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int statvfs(const char *name, struct statvfs *buffer)
|
|
|
|
{
|
|
|
|
return statvfs1(name, buffer, ST_WAIT);
|
2011-02-17 18:11:09 +01:00
|
|
|
}
|