kernel_stat.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. struct kernel_stat {
  7. #if defined(__ARMEB__)
  8. unsigned short st_dev;
  9. unsigned short __pad1;
  10. #else
  11. unsigned long st_dev;
  12. #endif
  13. unsigned long st_ino;
  14. unsigned short st_mode;
  15. unsigned short st_nlink;
  16. unsigned short st_uid;
  17. unsigned short st_gid;
  18. #if defined(__ARMEB__)
  19. unsigned short st_rdev;
  20. unsigned short __pad2;
  21. #else
  22. unsigned long st_rdev;
  23. #endif
  24. unsigned long st_size;
  25. unsigned long st_blksize;
  26. unsigned long st_blocks;
  27. unsigned long st_atime;
  28. unsigned long st_atime_nsec;
  29. unsigned long st_mtime;
  30. unsigned long st_mtime_nsec;
  31. unsigned long st_ctime;
  32. unsigned long st_ctime_nsec;
  33. unsigned long __unused4;
  34. unsigned long __unused5;
  35. };
  36. /* see the notes in common/xstatconv.c about why we have these
  37. * funky funk unions here ... i blame the schools */
  38. struct kernel_stat64 {
  39. #if defined(__ARMEB__)
  40. union {
  41. unsigned short old_abi;
  42. unsigned long long new_abi;
  43. } st_dev;
  44. #else
  45. unsigned long long st_dev;
  46. #endif
  47. unsigned char __pad0[4];
  48. #define _HAVE_STAT64___ST_INO
  49. unsigned long __st_ino;
  50. unsigned int st_mode;
  51. unsigned int st_nlink;
  52. unsigned long st_uid;
  53. unsigned long st_gid;
  54. #if defined(__ARMEB__)
  55. union {
  56. unsigned short old_abi;
  57. unsigned long long new_abi;
  58. } st_rdev;
  59. #else
  60. unsigned long long st_rdev;
  61. #endif
  62. unsigned char __pad3[4];
  63. long long st_size;
  64. unsigned long st_blksize;
  65. #if defined(__ARMEB__)
  66. unsigned long __pad_st_blocks; /* future possible st_blocks high bits */
  67. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  68. #else
  69. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  70. unsigned long __pad4; /* future possible st_blocks high bits */
  71. #endif
  72. unsigned long st_atime;
  73. unsigned long st_atime_nsec;
  74. unsigned long st_mtime;
  75. unsigned long st_mtime_nsec;
  76. unsigned long st_ctime;
  77. unsigned long st_ctime_nsec;
  78. unsigned long long st_ino;
  79. } __attribute__((packed));
  80. #endif /* _BITS_STAT_STRUCT_H */