kernel_stat.h 2.4 KB

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