1 #include <sys/cdefs.h> 2 #include <lib.h> 3 #include "namespace.h" 4 5 #include <sys/types.h> 6 #include <sys/statvfs.h> 7 #include <string.h> 8 9 #ifdef __weak_alias 10 __weak_alias(statvfs, _statvfs) 11 #endif 12 13 int statvfs1(const char *name, struct statvfs *buffer, int flags) 14 { 15 message m; 16 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)); 23 } 24 25 int statvfs(const char *name, struct statvfs *buffer) 26 { 27 return statvfs1(name, buffer, ST_WAIT); 28 } 29