xref: /minix/minix/lib/libc/sys/fstatvfs.c (revision 7f5f010b)
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
4 
5 #include <string.h>
6 #include <sys/statvfs.h>
7 
8 #if defined(__weak_alias)
9 __weak_alias(fstatvfs, _fstatvfs)
10 #endif
11 
12 int fstatvfs1(int fd, struct statvfs *buffer, int flags)
13 {
14   message m;
15 
16   memset(&m, 0, sizeof(m));
17   m.m_lc_vfs_statvfs1.fd = fd;
18   m.m_lc_vfs_statvfs1.buf = (vir_bytes)buffer;
19   m.m_lc_vfs_statvfs1.flags = flags;
20   return(_syscall(VFS_PROC_NR, VFS_FSTATVFS1, &m));
21 }
22 
23 int fstatvfs(int fd, struct statvfs *buffer)
24 {
25   return fstatvfs1(fd, buffer, ST_WAIT);
26 }
27