Chromium Code Reviews| 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 { | 7 { |
| 8 *buf = (struct statfs){0}; | 8 *buf = (struct statfs){0}; |
| 9 #ifdef SYS_statfs64 | 9 #ifdef SYS_statfs64 |
| 10 return syscall(SYS_statfs64, path, sizeof *buf, buf); | 10 return syscall(SYS_statfs64, path, sizeof *buf, buf); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 } | 51 } |
| 52 | 52 |
| 53 int fstatvfs(int fd, struct statvfs *buf) | 53 int fstatvfs(int fd, struct statvfs *buf) |
| 54 { | 54 { |
| 55 struct statfs kbuf; | 55 struct statfs kbuf; |
| 56 if (__fstatfs(fd, &kbuf)<0) return -1; | 56 if (__fstatfs(fd, &kbuf)<0) return -1; |
| 57 fixup(buf, &kbuf); | 57 fixup(buf, &kbuf); |
| 58 return 0; | 58 return 0; |
| 59 } | 59 } |
| 60 | 60 |
| 61 LFS64(statvfs); | 61 LFS64(statvfs); |
|
viettrungluu
2016/01/12 23:15:26
I wonder if we shouldn't just get rid of LFS64 (an
| |
| 62 LFS64(statfs); | 62 weak_alias(__statfs, statfs64); |
| 63 LFS64(fstatvfs); | 63 LFS64(fstatvfs); |
| 64 LFS64(fstatfs); | 64 weak_alias(__fstatfs, fstatfs64); |
| OLD | NEW |