stat.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #ifndef __ASM_SH_STAT_H
  2. #define __ASM_SH_STAT_H
  3. struct __old_kernel_stat {
  4. unsigned short st_dev;
  5. unsigned short st_ino;
  6. unsigned short st_mode;
  7. unsigned short st_nlink;
  8. unsigned short st_uid;
  9. unsigned short st_gid;
  10. unsigned short st_rdev;
  11. unsigned long st_size;
  12. unsigned long st_atime;
  13. unsigned long st_mtime;
  14. unsigned long st_ctime;
  15. };
  16. #if defined(__SH5__) || defined(CONFIG_CPU_SH5)
  17. struct stat {
  18. unsigned short st_dev;
  19. unsigned short __pad1;
  20. unsigned long st_ino;
  21. unsigned short st_mode;
  22. unsigned short st_nlink;
  23. unsigned short st_uid;
  24. unsigned short st_gid;
  25. unsigned short st_rdev;
  26. unsigned short __pad2;
  27. unsigned long st_size;
  28. unsigned long st_blksize;
  29. unsigned long st_blocks;
  30. unsigned long st_atime;
  31. unsigned long st_atime_nsec;
  32. unsigned long st_mtime;
  33. unsigned long st_mtime_nsec;
  34. unsigned long st_ctime;
  35. unsigned long st_ctime_nsec;
  36. unsigned long __unused4;
  37. unsigned long __unused5;
  38. };
  39. /* This matches struct stat64 in glibc2.1, hence the absolutely
  40. * insane amounts of padding around dev_t's.
  41. */
  42. struct stat64 {
  43. unsigned short st_dev;
  44. unsigned char __pad0[10];
  45. unsigned long st_ino;
  46. unsigned int st_mode;
  47. unsigned int st_nlink;
  48. unsigned long st_uid;
  49. unsigned long st_gid;
  50. unsigned short st_rdev;
  51. unsigned char __pad3[10];
  52. long long st_size;
  53. unsigned long st_blksize;
  54. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  55. unsigned long __pad4; /* future possible st_blocks high bits */
  56. unsigned long st_atime;
  57. unsigned long st_atime_nsec;
  58. unsigned long st_mtime;
  59. unsigned long st_mtime_nsec;
  60. unsigned long st_ctime;
  61. unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */
  62. unsigned long __unused1;
  63. unsigned long __unused2;
  64. };
  65. #else
  66. struct stat {
  67. unsigned long st_dev;
  68. unsigned long st_ino;
  69. unsigned short st_mode;
  70. unsigned short st_nlink;
  71. unsigned short st_uid;
  72. unsigned short st_gid;
  73. unsigned long st_rdev;
  74. unsigned long st_size;
  75. unsigned long st_blksize;
  76. unsigned long st_blocks;
  77. unsigned long st_atime;
  78. unsigned long st_atime_nsec;
  79. unsigned long st_mtime;
  80. unsigned long st_mtime_nsec;
  81. unsigned long st_ctime;
  82. unsigned long st_ctime_nsec;
  83. unsigned long __unused4;
  84. unsigned long __unused5;
  85. };
  86. /* This matches struct stat64 in glibc2.1, hence the absolutely
  87. * insane amounts of padding around dev_t's.
  88. */
  89. struct stat64 {
  90. unsigned long long st_dev;
  91. unsigned char __pad0[4];
  92. #define STAT64_HAS_BROKEN_ST_INO 1
  93. unsigned long __st_ino;
  94. unsigned int st_mode;
  95. unsigned int st_nlink;
  96. unsigned long st_uid;
  97. unsigned long st_gid;
  98. unsigned long long st_rdev;
  99. unsigned char __pad3[4];
  100. long long st_size;
  101. unsigned long st_blksize;
  102. unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
  103. unsigned long st_atime;
  104. unsigned long st_atime_nsec;
  105. unsigned long st_mtime;
  106. unsigned long st_mtime_nsec;
  107. unsigned long st_ctime;
  108. unsigned long st_ctime_nsec;
  109. unsigned long long st_ino;
  110. };
  111. #define STAT_HAVE_NSEC 1
  112. #endif
  113. #endif /* __ASM_SH_STAT_H */