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));
|
2014-05-12 11:49:08 +02:00
|
|
|
m.m_lc_vfs_statvfs1.len = strlen(name) + 1;
|
|
|
|
m.m_lc_vfs_statvfs1.name = (vir_bytes)name;
|
|
|
|
m.m_lc_vfs_statvfs1.buf = (vir_bytes)buffer;
|
|
|
|
m.m_lc_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
|
|
|
}
|