1
0

statvfs.h 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _SYS_STATVFS_H
  2. #define _SYS_STATVFS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define __NEED_fsblkcnt_t
  7. #define __NEED_fsfilcnt_t
  8. #include <bits/alltypes.h>
  9. #include <endian.h>
  10. struct statvfs {
  11. unsigned long f_bsize, f_frsize;
  12. fsblkcnt_t f_blocks, f_bfree, f_bavail;
  13. fsfilcnt_t f_files, f_ffree, f_favail;
  14. #if __BYTE_ORDER == __LITTLE_ENDIAN
  15. unsigned long f_fsid;
  16. unsigned :8*(2*sizeof(int)-sizeof(long));
  17. #else
  18. unsigned :8*(2*sizeof(int)-sizeof(long));
  19. unsigned long f_fsid;
  20. #endif
  21. unsigned long f_flag, f_namemax;
  22. int __reserved[6];
  23. };
  24. int statvfs (const char *, struct statvfs *);
  25. int fstatvfs (int, struct statvfs *);
  26. #define ST_RDONLY 1
  27. #define ST_NOSUID 2
  28. #define ST_NODEV 4
  29. #define ST_NOEXEC 8
  30. #define ST_SYNCHRONOUS 16
  31. #define ST_MANDLOCK 64
  32. #define ST_WRITE 128
  33. #define ST_APPEND 256
  34. #define ST_IMMUTABLE 512
  35. #define ST_NOATIME 1024
  36. #define ST_NODIRATIME 2048
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif