Browse Source

fix statvfs syscalls (missing size argument)

Rich Felker 14 years ago
parent
commit
7e795ca7ed
3 changed files with 3 additions and 3 deletions
  1. 1 1
      arch/x86_64/bits/statfs.h
  2. 1 1
      src/stat/fstatvfs.c
  3. 1 1
      src/stat/statvfs.c

+ 1 - 1
arch/x86_64/bits/statfs.h

@@ -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];
 };

+ 1 - 1
src/stat/fstatvfs.c

@@ -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);

+ 1 - 1
src/stat/statvfs.c

@@ -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);