kernel_stat.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. struct timespec st_atim;
  24. struct timespec st_mtim;
  25. struct timespec st_ctim;
  26. unsigned int st_blksize;
  27. unsigned int reserved3;
  28. unsigned long st_blocks;
  29. };
  30. #define kernel_stat64 kernel_stat
  31. #elif _MIPS_SIM == _MIPS_SIM_NABI32
  32. /* The memory layout is the same as of struct stat64 of the 32-bit kernel. */
  33. struct kernel_stat {
  34. unsigned int st_dev;
  35. unsigned int st_pad1[3];
  36. unsigned long long st_ino;
  37. __kernel_mode_t st_mode;
  38. __kernel_nlink_t st_nlink;
  39. __kernel_uid_t st_uid;
  40. __kernel_gid_t st_gid;
  41. unsigned int st_rdev;
  42. unsigned int st_pad2[3];
  43. unsigned long long st_size;
  44. struct timespec st_atim;
  45. struct timespec st_mtim;
  46. struct timespec st_ctim;
  47. unsigned int st_blksize;
  48. unsigned int reserved3;
  49. unsigned long long st_blocks;
  50. };
  51. #define kernel_stat64 kernel_stat
  52. #else /* O32 */
  53. struct kernel_stat {
  54. __kernel_dev_t st_dev;
  55. long st_pad1[3];
  56. __kernel_ino_t st_ino;
  57. __kernel_mode_t st_mode;
  58. __kernel_nlink_t st_nlink;
  59. __kernel_uid_t st_uid;
  60. __kernel_gid_t st_gid;
  61. __kernel_dev_t st_rdev;
  62. long st_pad2[2];
  63. __kernel_off_t st_size;
  64. long st_pad3;
  65. struct timespec st_atim;
  66. struct timespec st_mtim;
  67. struct timespec st_ctim;
  68. long st_blksize;
  69. long st_blocks;
  70. long st_pad4[14];
  71. };
  72. struct kernel_stat64 {
  73. unsigned long st_dev;
  74. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  75. unsigned long long st_ino;
  76. __kernel_mode_t st_mode;
  77. __kernel_nlink_t st_nlink;
  78. __kernel_uid_t st_uid;
  79. __kernel_gid_t st_gid;
  80. unsigned long st_rdev;
  81. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  82. long long st_size;
  83. struct timespec st_atim;
  84. struct timespec st_mtim;
  85. struct timespec st_ctim;
  86. unsigned long st_blksize;
  87. unsigned long st_pad2;
  88. long long st_blocks;
  89. };
  90. #endif /* O32 */
  91. #endif /* _BITS_STAT_STRUCT_H */