kernel_stat.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #ifndef _BITS_STAT_STRUCT_H
  2. #define _BITS_STAT_STRUCT_H
  3. #ifndef _LIBC
  4. #error bits/kernel_stat.h is for internal uClibc use only!
  5. #endif
  6. /* This file provides whatever this particular arch's kernel thinks
  7. * struct kernel_stat should look like... It turns out each arch has a
  8. * different opinion on the subject... */
  9. #include <sgidefs.h>
  10. #if _MIPS_SIM == _MIPS_SIM_ABI64
  11. /* The memory layout is the same as of struct stat64 of the 32-bit kernel. */
  12. struct kernel_stat {
  13. __kernel_dev_t st_dev;
  14. unsigned int st_pad1[3];
  15. __kernel_ino_t st_ino;
  16. __kernel_mode_t st_mode;
  17. __kernel_nlink_t st_nlink;
  18. __kernel_uid_t st_uid;
  19. __kernel_gid_t st_gid;
  20. __kernel_dev_t st_rdev;
  21. unsigned int st_pad2[3];
  22. __kernel_off_t st_size;
  23. unsigned int st_atime;
  24. unsigned int reserved0;
  25. unsigned int st_mtime;
  26. unsigned int reserved1;
  27. unsigned int st_ctime;
  28. unsigned int reserved2;
  29. unsigned int st_blksize;
  30. unsigned int reserved3;
  31. unsigned long st_blocks;
  32. };
  33. #define kernel_stat64 kernel_stat
  34. #elif _MIPS_SIM == _MIPS_SIM_NABI32
  35. /* The memory layout is the same as of struct stat64 of the 32-bit kernel. */
  36. struct kernel_stat {
  37. unsigned int st_dev;
  38. unsigned int st_pad1[3];
  39. unsigned long long st_ino;
  40. __kernel_mode_t st_mode;
  41. __kernel_nlink_t st_nlink;
  42. __kernel_uid_t st_uid;
  43. __kernel_gid_t st_gid;
  44. unsigned int st_rdev;
  45. unsigned int st_pad2[3];
  46. unsigned long long st_size;
  47. unsigned int st_atime;
  48. unsigned int reserved0;
  49. unsigned int st_mtime;
  50. unsigned int reserved1;
  51. unsigned int st_ctime;
  52. unsigned int reserved2;
  53. unsigned int st_blksize;
  54. unsigned int reserved3;
  55. unsigned long long st_blocks;
  56. };
  57. #define kernel_stat64 kernel_stat
  58. #else /* O32 */
  59. struct kernel_stat {
  60. __kernel_dev_t st_dev;
  61. long st_pad1[3];
  62. __kernel_ino_t st_ino;
  63. __kernel_mode_t st_mode;
  64. __kernel_nlink_t st_nlink;
  65. __kernel_uid_t st_uid;
  66. __kernel_gid_t st_gid;
  67. __kernel_dev_t st_rdev;
  68. long st_pad2[2];
  69. __kernel_off_t st_size;
  70. long st_pad3;
  71. time_t st_atime;
  72. long reserved0;
  73. time_t st_mtime;
  74. long reserved1;
  75. time_t st_ctime;
  76. long reserved2;
  77. long st_blksize;
  78. long st_blocks;
  79. long st_pad4[14];
  80. };
  81. struct kernel_stat64 {
  82. unsigned long st_dev;
  83. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  84. unsigned long long st_ino;
  85. __kernel_mode_t st_mode;
  86. __kernel_nlink_t st_nlink;
  87. __kernel_uid_t st_uid;
  88. __kernel_gid_t st_gid;
  89. unsigned long st_rdev;
  90. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  91. long long st_size;
  92. time_t st_atime;
  93. unsigned long reserved0; /* Reserved for st_atime expansion */
  94. time_t st_mtime;
  95. unsigned long reserved1; /* Reserved for st_mtime expansion */
  96. time_t st_ctime;
  97. unsigned long reserved2; /* Reserved for st_ctime expansion */
  98. unsigned long st_blksize;
  99. unsigned long st_pad2;
  100. long long st_blocks;
  101. };
  102. #endif /* O32 */
  103. #endif /* _BITS_STAT_STRUCT_H */