statfs.h 1.8 KB

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