etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / statvfs.c
blobb61b4e260db4b35a63f795abc0bb299dabe41408
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #include <sys/types.h>
6 #include <sys/statvfs.h>
7 #include <string.h>
9 #ifdef __weak_alias
10 __weak_alias(statvfs, _statvfs)
11 #endif
13 int statvfs1(const char *name, struct statvfs *buffer, int flags)
15 message m;
17 memset(&m, 0, sizeof(m));
18 m.m_lc_vfs_statvfs1.len = strlen(name) + 1;
19 m.m_lc_vfs_statvfs1.name = (vir_bytes)name;
20 m.m_lc_vfs_statvfs1.buf = (vir_bytes)buffer;
21 m.m_lc_vfs_statvfs1.flags = flags;
22 return(_syscall(VFS_PROC_NR, VFS_STATVFS1, &m));
25 int statvfs(const char *name, struct statvfs *buffer)
27 return statvfs1(name, buffer, ST_WAIT);