| OLD | NEW |
| 1 #include <sys/statvfs.h> | 1 #include <sys/statvfs.h> |
| 2 #include <sys/statfs.h> | 2 #include <sys/statfs.h> |
| 3 #include "syscall.h" | 3 #include "syscall.h" |
| 4 #include "libc.h" | 4 #include "libc.h" |
| 5 | 5 |
| 6 int __statfs(const char* path, struct statfs* buf) { | 6 int __statfs(const char* path, struct statfs* buf) { |
| 7 *buf = (struct statfs){0}; | 7 *buf = (struct statfs){0}; |
| 8 #ifdef SYS_statfs64 | 8 #ifdef SYS_statfs64 |
| 9 return syscall(SYS_statfs64, path, sizeof *buf, buf); | 9 return syscall(SYS_statfs64, path, sizeof *buf, buf); |
| 10 #else | 10 #else |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 int fstatvfs(int fd, struct statvfs* buf) { | 50 int fstatvfs(int fd, struct statvfs* buf) { |
| 51 struct statfs kbuf; | 51 struct statfs kbuf; |
| 52 if (__fstatfs(fd, &kbuf) < 0) | 52 if (__fstatfs(fd, &kbuf) < 0) |
| 53 return -1; | 53 return -1; |
| 54 fixup(buf, &kbuf); | 54 fixup(buf, &kbuf); |
| 55 return 0; | 55 return 0; |
| 56 } | 56 } |
| 57 | 57 |
| 58 LFS64(statvfs); | |
| 59 weak_alias(__statfs, statfs64); | 58 weak_alias(__statfs, statfs64); |
| 60 LFS64(fstatvfs); | |
| 61 weak_alias(__fstatfs, fstatfs64); | 59 weak_alias(__fstatfs, fstatfs64); |
| OLD | NEW |