kernel_stat.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #define STAT_HAVE_NSEC 1
  7. struct kernel_stat {
  8. #if defined(__ARMEB__)
  9. unsigned short st_dev;
  10. unsigned short __pad1;
  11. #else
  12. unsigned long st_dev;
  13. #endif
  14. unsigned long st_ino;
  15. unsigned short st_mode;
  16. unsigned short st_nlink;
  17. unsigned short st_uid;
  18. unsigned short st_gid;
  19. #if defined(__ARMEB__)
  20. unsigned short st_rdev;
  21. unsigned short __pad2;
  22. #else
  23. unsigned long st_rdev;
  24. #endif
  25. unsigned long st_size;
  26. unsigned long st_blksize;
  27. unsigned long st_blocks;
  28. unsigned long st_atime;
  29. unsigned long st_atime_nsec;
  30. unsigned long st_mtime;
  31. unsigned long st_mtime_nsec;
  32. unsigned long st_ctime;
  33. unsigned long st_ctime_nsec;
  34. unsigned long __unused4;
  35. unsigned long __unused5;
  36. };
  37. struct kernel_stat64 {
  38. unsigned long long st_dev;
  39. unsigned char __pad0[4];
  40. #define _HAVE_STAT64___ST_INO
  41. unsigned long __st_ino;
  42. unsigned int st_mode;
  43. unsigned int st_nlink;
  44. unsigned long st_uid;
  45. unsigned long st_gid;
  46. unsigned long long st_rdev;
  47. unsigned char __pad3[4];
  48. long long st_size;
  49. unsigned long st_blksize;
  50. #if defined(__ARMEB__)
  51. unsigned long __pad4; /* future possible st_blocks high bits */
  52. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  53. #else
  54. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  55. unsigned long __pad4; /* future possible st_blocks high bits */
  56. #endif
  57. unsigned long st_atime;
  58. unsigned long st_atime_nsec;
  59. unsigned long st_mtime;
  60. unsigned long st_mtime_nsec;
  61. unsigned long st_ctime;
  62. unsigned long st_ctime_nsec;
  63. unsigned long long st_ino;
  64. } __attribute__((packed));
  65. #endif /* _BITS_STAT_STRUCT_H */