fix statvfs syscalls (missing size argument)
authorRich Felker <dalias@aerifal.cx>
Sun, 3 Apr 2011 19:42:31 +0000 (15:42 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 3 Apr 2011 19:42:31 +0000 (15:42 -0400)
arch/x86_64/bits/statfs.h
src/stat/fstatvfs.c
src/stat/statvfs.c

index 51bf8a5..63de75b 100644 (file)
@@ -11,5 +11,5 @@ struct statvfs {
        unsigned long f_frsize;
        fsfilcnt_t f_favail;
        unsigned long f_flag;
-       unsigned long __reserved[2];
+       unsigned long __reserved[3];
 };
index 8a2e423..833e8ec 100644 (file)
@@ -4,7 +4,7 @@
 
 int fstatvfs(int fd, struct statvfs *buf)
 {
-       return syscall(SYS_fstatfs, fd, buf);
+       return syscall(SYS_fstatfs, fd, sizeof *buf, buf);
 }
 
 weak_alias(fstatvfs, fstatfs);
index 1725299..517eebd 100644 (file)
@@ -4,7 +4,7 @@
 
 int statvfs(const char *path, struct statvfs *buf)
 {
-       return syscall(SYS_statfs, path, buf);
+       return syscall(SYS_statfs, path, sizeof *buf, buf);
 }
 
 weak_alias(statvfs, statfs);