statfs.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef _UAPI_GENERIC_STATFS_H
  2. #define _UAPI_GENERIC_STATFS_H
  3. #include <linux/types.h>
  4. /*
  5. * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'.
  6. * Yes, they differ in signedness as well as size.
  7. * Special cases can override it for themselves -- except for S390x, which
  8. * is just a little too special for us. And MIPS, which I'm not touching
  9. * with a 10' pole.
  10. */
  11. #ifndef __statfs_word
  12. #if __BITS_PER_LONG == 64
  13. #define __statfs_word __kernel_long_t
  14. #else
  15. #define __statfs_word __u32
  16. #endif
  17. #endif
  18. struct statfs {
  19. __statfs_word f_type;
  20. __statfs_word f_bsize;
  21. __statfs_word f_blocks;
  22. __statfs_word f_bfree;
  23. __statfs_word f_bavail;
  24. __statfs_word f_files;
  25. __statfs_word f_ffree;
  26. __kernel_fsid_t f_fsid;
  27. __statfs_word f_namelen;
  28. __statfs_word f_frsize;
  29. __statfs_word f_flags;
  30. __statfs_word f_spare[4];
  31. };
  32. /*
  33. * ARM needs to avoid the 32-bit padding at the end, for consistency
  34. * between EABI and OABI
  35. */
  36. #ifndef ARCH_PACK_STATFS64
  37. #define ARCH_PACK_STATFS64
  38. #endif
  39. struct statfs64 {
  40. __statfs_word f_type;
  41. __statfs_word f_bsize;
  42. __u64 f_blocks;
  43. __u64 f_bfree;
  44. __u64 f_bavail;
  45. __u64 f_files;
  46. __u64 f_ffree;
  47. __kernel_fsid_t f_fsid;
  48. __statfs_word f_namelen;
  49. __statfs_word f_frsize;
  50. __statfs_word f_flags;
  51. __statfs_word f_spare[4];
  52. } ARCH_PACK_STATFS64;
  53. /*
  54. * IA64 and x86_64 need to avoid the 32-bit padding at the end,
  55. * to be compatible with the i386 ABI
  56. */
  57. #ifndef ARCH_PACK_COMPAT_STATFS64
  58. #define ARCH_PACK_COMPAT_STATFS64
  59. #endif
  60. struct compat_statfs64 {
  61. __u32 f_type;
  62. __u32 f_bsize;
  63. __u64 f_blocks;
  64. __u64 f_bfree;
  65. __u64 f_bavail;
  66. __u64 f_files;
  67. __u64 f_ffree;
  68. __kernel_fsid_t f_fsid;
  69. __u32 f_namelen;
  70. __u32 f_frsize;
  71. __u32 f_flags;
  72. __u32 f_spare[4];
  73. } ARCH_PACK_COMPAT_STATFS64;
  74. #endif /* _UAPI_GENERIC_STATFS_H */