kernel_stat.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 stat should look like... It turns out each arch has a
  5. * different opinion on the subject... */
  6. #ifndef __USE_FILE_OFFSET64
  7. struct stat {
  8. unsigned short st_dev;
  9. unsigned short __pad1;
  10. unsigned long st_ino;
  11. unsigned short st_mode;
  12. unsigned short st_nlink;
  13. unsigned short st_uid;
  14. unsigned short st_gid;
  15. unsigned short st_rdev;
  16. unsigned short __pad2;
  17. unsigned long st_size;
  18. unsigned long st_blksize;
  19. unsigned long st_blocks;
  20. unsigned long st_atime;
  21. unsigned long __unused1;
  22. unsigned long st_mtime;
  23. unsigned long __unused2;
  24. unsigned long st_ctime;
  25. unsigned long __unused3;
  26. unsigned long __unused4;
  27. unsigned long __unused5;
  28. };
  29. #else
  30. struct stat {
  31. unsigned char __pad0[6];
  32. unsigned short st_dev;
  33. unsigned char __pad1[2];
  34. #define STAT64_HAS_BROKEN_ST_INO 1
  35. unsigned long __st_ino;
  36. unsigned int st_mode;
  37. unsigned int st_nlink;
  38. unsigned long st_uid;
  39. unsigned long st_gid;
  40. unsigned char __pad2[6];
  41. unsigned short st_rdev;
  42. unsigned char __pad3[2];
  43. long long st_size;
  44. unsigned long st_blksize;
  45. unsigned long __pad4; /* future possible st_blocks high bits */
  46. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  47. unsigned long st_atime;
  48. unsigned long __pad5;
  49. unsigned long st_mtime;
  50. unsigned long __pad6;
  51. unsigned long st_ctime;
  52. unsigned long __pad7; /* will be high 32 bits of ctime someday */
  53. unsigned long long st_ino;
  54. };
  55. #endif
  56. #ifdef __USE_LARGEFILE64
  57. struct stat64 {
  58. unsigned char __pad0[6];
  59. unsigned short st_dev;
  60. unsigned char __pad1[2];
  61. #define STAT64_HAS_BROKEN_ST_INO 1
  62. unsigned long __st_ino;
  63. unsigned int st_mode;
  64. unsigned int st_nlink;
  65. unsigned long st_uid;
  66. unsigned long st_gid;
  67. unsigned char __pad2[6];
  68. unsigned short st_rdev;
  69. unsigned char __pad3[2];
  70. long long st_size;
  71. unsigned long st_blksize;
  72. unsigned long __pad4; /* future possible st_blocks high bits */
  73. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  74. unsigned long st_atime;
  75. unsigned long __pad5;
  76. unsigned long st_mtime;
  77. unsigned long __pad6;
  78. unsigned long st_ctime;
  79. unsigned long __pad7; /* will be high 32 bits of ctime someday */
  80. unsigned long long st_ino;
  81. };
  82. #endif
  83. #endif /* _BITS_STAT_STRUCT_H */