kernel_stat.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. #warning please verify struct stat for your architecture matches struct stat for x86...
  7. #ifndef __USE_FILE_OFFSET64
  8. struct stat {
  9. unsigned short st_dev;
  10. unsigned short __pad1;
  11. unsigned long st_ino;
  12. unsigned short st_mode;
  13. unsigned short st_nlink;
  14. unsigned short st_uid;
  15. unsigned short st_gid;
  16. unsigned short st_rdev;
  17. unsigned short __pad2;
  18. unsigned long st_size;
  19. unsigned long st_blksize;
  20. unsigned long st_blocks;
  21. unsigned long st_atime;
  22. unsigned long __unused1;
  23. unsigned long st_mtime;
  24. unsigned long __unused2;
  25. unsigned long st_ctime;
  26. unsigned long __unused3;
  27. unsigned long __unused4;
  28. unsigned long __unused5;
  29. };
  30. #else
  31. struct stat {
  32. unsigned short st_dev;
  33. unsigned char __pad0[10];
  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 short st_rdev;
  41. unsigned char __pad3[10];
  42. long long st_size;
  43. unsigned long st_blksize;
  44. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  45. unsigned long __pad4; /* future possible st_blocks high bits */
  46. unsigned long st_atime;
  47. unsigned long __pad5;
  48. unsigned long st_mtime;
  49. unsigned long __pad6;
  50. unsigned long st_ctime;
  51. unsigned long __pad7; /* will be high 32 bits of ctime someday */
  52. unsigned long long st_ino;
  53. };
  54. #endif
  55. #ifdef __USE_LARGEFILE64
  56. struct stat64 {
  57. unsigned short st_dev;
  58. unsigned char __pad0[10];
  59. #define STAT64_HAS_BROKEN_ST_INO 1
  60. unsigned long __st_ino;
  61. unsigned int st_mode;
  62. unsigned int st_nlink;
  63. unsigned long st_uid;
  64. unsigned long st_gid;
  65. unsigned short st_rdev;
  66. unsigned char __pad3[10];
  67. long long st_size;
  68. unsigned long st_blksize;
  69. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  70. unsigned long __pad4; /* future possible st_blocks high bits */
  71. unsigned long st_atime;
  72. unsigned long __pad5;
  73. unsigned long st_mtime;
  74. unsigned long __pad6;
  75. unsigned long st_ctime;
  76. unsigned long __pad7; /* will be high 32 bits of ctime someday */
  77. unsigned long long st_ino;
  78. };
  79. #endif
  80. #endif /* _BITS_STAT_STRUCT_H */