statfs.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #ifndef _SYS_STATFS_H
  7. # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
  8. #endif
  9. #include <endian.h>
  10. #include <bits/align64bit.h>
  11. #include <bits/types.h>
  12. struct statfs
  13. {
  14. __U32_TYPE f_type;
  15. __U32_TYPE f_bsize;
  16. #ifndef __USE_FILE_OFFSET64
  17. # if __BYTE_ORDER == __LITTLE_ENDIAN
  18. __U32_TYPE f_blocks;
  19. __U32_TYPE __pad1;
  20. __U32_TYPE f_bfree;
  21. __U32_TYPE __pad2;
  22. __U32_TYPE f_bavail;
  23. __U32_TYPE __pad3;
  24. __U32_TYPE f_files;
  25. __U32_TYPE __pad4;
  26. __U32_TYPE f_ffree;
  27. __U32_TYPE __pad5;
  28. # else
  29. __U32_TYPE __pad1;
  30. __U32_TYPE f_blocks;
  31. __U32_TYPE __pad2;
  32. __U32_TYPE f_bfree;
  33. __U32_TYPE __pad3;
  34. __U32_TYPE f_bavail;
  35. __U32_TYPE __pad4;
  36. __U32_TYPE f_files;
  37. __U32_TYPE __pad5;
  38. __U32_TYPE f_ffree;
  39. # endif /* __LITTLE_ENDIAN */
  40. #else
  41. __U64_TYPE f_blocks;
  42. __U64_TYPE f_bfree;
  43. __U64_TYPE f_bavail;
  44. __U64_TYPE f_files;
  45. __U64_TYPE f_ffree;
  46. #endif /* __USE_FILE_OFFSET64 */
  47. __fsid_t f_fsid;
  48. __U32_TYPE f_namelen;
  49. __U32_TYPE f_frsize;
  50. __U32_TYPE f_flags;
  51. __U32_TYPE f_spare[4];
  52. } __ARCH_64BIT_ALIGNMENT__;
  53. #ifdef __USE_LARGEFILE64
  54. struct statfs64
  55. {
  56. __U32_TYPE f_type;
  57. __U32_TYPE f_bsize;
  58. __U64_TYPE f_blocks;
  59. __U64_TYPE f_bfree;
  60. __U64_TYPE f_bavail;
  61. __U64_TYPE f_files;
  62. __U64_TYPE f_ffree;
  63. __fsid_t f_fsid;
  64. __U32_TYPE f_namelen;
  65. __U32_TYPE f_frsize;
  66. __U32_TYPE f_flags;
  67. __U32_TYPE f_spare[4];
  68. };
  69. #endif
  70. /* Tell code we have these members. */
  71. #define _STATFS_F_NAMELEN
  72. #define _STATFS_F_FRSIZE