/* Test whether a basic fstatvfs invocation works. */ #include #include #include "../basic.h" int main(void) { int fd = open("sys_statvfs", O_RDONLY | O_DIRECTORY); if ( fd < 0 ) err(1, "sys_statvfs"); struct statvfs stvfs; if ( fstatvfs(fd, &stvfs) < 0 ) err(1, "fstatvfs"); return 0; }