stat.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #ifndef _ASM_STAT_H
  2. #define _ASM_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. /* This matches struct stat in uClibc/glibc. */
  17. struct stat {
  18. unsigned char __pad1[6];
  19. unsigned short st_dev;
  20. unsigned long __pad2;
  21. unsigned long st_ino;
  22. unsigned short __pad3;
  23. unsigned short st_mode;
  24. unsigned short __pad4;
  25. unsigned short st_nlink;
  26. unsigned short __pad5;
  27. unsigned short st_uid;
  28. unsigned short __pad6;
  29. unsigned short st_gid;
  30. unsigned char __pad7[6];
  31. unsigned short st_rdev;
  32. unsigned long __pad8;
  33. unsigned long st_size;
  34. unsigned long __pad9; /* align 64-bit st_blocks to 2-word */
  35. unsigned long st_blksize;
  36. unsigned long __pad10; /* future possible st_blocks high bits */
  37. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  38. unsigned long __unused1;
  39. unsigned long st_atime;
  40. unsigned long __unused2;
  41. unsigned long st_mtime;
  42. unsigned long __unused3;
  43. unsigned long st_ctime;
  44. unsigned long long __unused4;
  45. };
  46. /* This matches struct stat64 in uClibc/glibc. The layout is exactly
  47. the same as that of struct stat above, with 64-bit types taking up
  48. space that was formerly used by padding. stat syscalls are still
  49. different from stat64, though, in that the former tests for
  50. overflow. */
  51. struct stat64 {
  52. unsigned char __pad1[6];
  53. unsigned short st_dev;
  54. unsigned long long st_ino;
  55. unsigned int st_mode;
  56. unsigned int st_nlink;
  57. unsigned long st_uid;
  58. unsigned long st_gid;
  59. unsigned char __pad2[6];
  60. unsigned short st_rdev;
  61. long long st_size;
  62. unsigned long __pad3; /* align 64-bit st_blocks to 2-word */
  63. unsigned long st_blksize;
  64. unsigned long __pad4; /* future possible st_blocks high bits */
  65. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  66. unsigned long st_atime_nsec;
  67. unsigned long st_atime;
  68. unsigned int st_mtime_nsec;
  69. unsigned long st_mtime;
  70. unsigned long st_ctime_nsec;
  71. unsigned long st_ctime;
  72. unsigned long long __unused4;
  73. };
  74. #endif /* _ASM_STAT_H */