statfs.h 359 B

1234567891011121314151617181920212223
  1. #include <bits/types.h>
  2. #include <syscall.h>
  3. struct statfs {
  4. ulong type;
  5. ulong bsize;
  6. ulong blocks;
  7. ulong bfree;
  8. ulong bavail;
  9. ulong files;
  10. ulong ffree;
  11. int fsid;
  12. ulong namelen;
  13. ulong frsize;
  14. ulong flags;
  15. long spare[4];
  16. };
  17. inline static long sys_statfs(const char* path, struct statfs* st)
  18. {
  19. return syscall2(NR_statfs, (long)path, (long)st);
  20. }