stat.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #ifndef _ASMARM_STAT_H
  2. #define _ASMARM_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. #define STAT_HAVE_NSEC
  17. struct stat {
  18. #if defined(__ARMEB__)
  19. unsigned short st_dev;
  20. unsigned short __pad1;
  21. #else
  22. unsigned long st_dev;
  23. #endif
  24. unsigned long st_ino;
  25. unsigned short st_mode;
  26. unsigned short st_nlink;
  27. unsigned short st_uid;
  28. unsigned short st_gid;
  29. #if defined(__ARMEB__)
  30. unsigned short st_rdev;
  31. unsigned short __pad2;
  32. #else
  33. unsigned long st_rdev;
  34. #endif
  35. unsigned long st_size;
  36. unsigned long st_blksize;
  37. unsigned long st_blocks;
  38. unsigned long st_atime;
  39. unsigned long st_atime_nsec;
  40. unsigned long st_mtime;
  41. unsigned long st_mtime_nsec;
  42. unsigned long st_ctime;
  43. unsigned long st_ctime_nsec;
  44. unsigned long __unused4;
  45. unsigned long __unused5;
  46. };
  47. /* This matches struct stat64 in glibc2.1, hence the absolutely
  48. * insane amounts of padding around dev_t's.
  49. * Note: The kernel zero's the padded region because glibc might read them
  50. * in the hope that the kernel has stretched to using larger sizes.
  51. */
  52. struct stat64 {
  53. unsigned long long st_dev;
  54. unsigned char __pad0[4];
  55. #define STAT64_HAS_BROKEN_ST_INO 1
  56. unsigned long __st_ino;
  57. unsigned int st_mode;
  58. unsigned int st_nlink;
  59. unsigned long st_uid;
  60. unsigned long st_gid;
  61. unsigned long long st_rdev;
  62. unsigned char __pad3[4];
  63. long long st_size;
  64. unsigned long st_blksize;
  65. unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
  66. unsigned long st_atime;
  67. unsigned long st_atime_nsec;
  68. unsigned long st_mtime;
  69. unsigned long st_mtime_nsec;
  70. unsigned long st_ctime;
  71. unsigned long st_ctime_nsec;
  72. unsigned long long st_ino;
  73. };
  74. #endif