1
0

statvfs.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef _SYS_STATVFS_H
  2. #define _SYS_STATVFS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_fsblkcnt_t
  8. #define __NEED_fsfilcnt_t
  9. #include <bits/alltypes.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. unsigned int f_type;
  23. int __reserved[5];
  24. };
  25. int statvfs (const char *__restrict, struct statvfs *__restrict);
  26. int fstatvfs (int, struct statvfs *);
  27. #define ST_RDONLY 1
  28. #define ST_NOSUID 2
  29. #define ST_NODEV 4
  30. #define ST_NOEXEC 8
  31. #define ST_SYNCHRONOUS 16
  32. #define ST_MANDLOCK 64
  33. #define ST_WRITE 128
  34. #define ST_APPEND 256
  35. #define ST_IMMUTABLE 512
  36. #define ST_NOATIME 1024
  37. #define ST_NODIRATIME 2048
  38. #define ST_RELATIME 4096
  39. #if defined(_LARGEFILE64_SOURCE)
  40. #define statvfs64 statvfs
  41. #define fstatvfs64 fstatvfs
  42. #define fsblkcnt64_t fsblkcnt_t
  43. #define fsfilcnt64_t fsfilcnt_t
  44. #endif
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif