2011-03-04 23:31:31 +01:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <lib.h>
|
|
|
|
#include "namespace.h"
|
|
|
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/statfs.h>
|
2013-08-20 00:55:49 +02:00
|
|
|
#include <sys/statvfs.h>
|
2011-03-04 23:31:31 +01:00
|
|
|
|
|
|
|
int fstatfs(int fd, struct statfs *buffer)
|
|
|
|
{
|
2013-08-20 00:55:49 +02:00
|
|
|
struct statvfs svbuffer;
|
|
|
|
int r;
|
2011-03-04 23:31:31 +01:00
|
|
|
|
2013-08-20 00:55:49 +02:00
|
|
|
if ((r = fstatvfs(fd, &svbuffer)) != 0)
|
|
|
|
return r;
|
|
|
|
|
|
|
|
buffer->f_bsize = svbuffer.f_bsize;
|
|
|
|
|
|
|
|
return 0;
|
2011-03-04 23:31:31 +01:00
|
|
|
}
|