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 51bf8a5bd760b10819e864e7d2fa3d111f2c32e5..63de75bbe374641a48b66a694e3b9fbce132391b 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 8a2e423511a2423d8f331bc98c2e0c9ca72c0173..833e8ec87606d4457db9916255ddfed1cd37c27b 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 1725299785316ad1024f8a507aa5c5886b5f53b2..517eebda719b5d7e0a2b5627f9cabc827c1a7435 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);