kernel_stat.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef _BITS_STAT_STRUCT_H
  2. #define _BITS_STAT_STRUCT_H
  3. #ifndef _LIBC
  4. #error bits/kernel_stat.h is for internal uClibc use only!
  5. #endif
  6. /* This file provides whatever this particular arch's kernel thinks
  7. * struct kernel_stat should look like... It turns out each arch has a
  8. * different opinion on the subject... */
  9. #define STAT_HAVE_NSEC 1
  10. struct kernel_stat {
  11. #if defined(__ARMEB__)
  12. unsigned short st_dev;
  13. unsigned short __pad1;
  14. #else
  15. unsigned long st_dev;
  16. #endif
  17. unsigned long st_ino;
  18. unsigned short st_mode;
  19. unsigned short st_nlink;
  20. unsigned short st_uid;
  21. unsigned short st_gid;
  22. #if defined(__ARMEB__)
  23. unsigned short st_rdev;
  24. unsigned short __pad2;
  25. #else
  26. unsigned long st_rdev;
  27. #endif
  28. unsigned long st_size;
  29. unsigned long st_blksize;
  30. unsigned long st_blocks;
  31. unsigned long st_atime;
  32. unsigned long st_atime_nsec;
  33. unsigned long st_mtime;
  34. unsigned long st_mtime_nsec;
  35. unsigned long st_ctime;
  36. unsigned long st_ctime_nsec;
  37. unsigned long __unused4;
  38. unsigned long __unused5;
  39. };
  40. struct kernel_stat64 {
  41. unsigned long long st_dev;
  42. unsigned char __pad0[4];
  43. #define _HAVE_STAT64___ST_INO
  44. unsigned long __st_ino;
  45. unsigned int st_mode;
  46. unsigned int st_nlink;
  47. unsigned long st_uid;
  48. unsigned long st_gid;
  49. unsigned long long st_rdev;
  50. unsigned char __pad3[4];
  51. long long st_size;
  52. unsigned long st_blksize;
  53. unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
  54. unsigned long st_atime;
  55. unsigned long st_atime_nsec;
  56. unsigned long st_mtime;
  57. unsigned long st_mtime_nsec;
  58. unsigned long st_ctime;
  59. unsigned long st_ctime_nsec;
  60. unsigned long long st_ino;
  61. #ifndef __ARM_EABI__
  62. } __attribute__((packed));
  63. #else
  64. };
  65. #endif
  66. #endif /* _BITS_STAT_STRUCT_H */