kernel_stat.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. struct kernel_stat {
  10. #if defined(__ARMEB__)
  11. unsigned short st_dev;
  12. unsigned short __pad1;
  13. #else
  14. unsigned long st_dev;
  15. #endif
  16. unsigned long st_ino;
  17. unsigned short st_mode;
  18. unsigned short st_nlink;
  19. unsigned short st_uid;
  20. unsigned short st_gid;
  21. #if defined(__ARMEB__)
  22. unsigned short st_rdev;
  23. unsigned short __pad2;
  24. #else
  25. unsigned long st_rdev;
  26. #endif
  27. unsigned long st_size;
  28. unsigned long st_blksize;
  29. unsigned long st_blocks;
  30. struct timespec st_atim;
  31. struct timespec st_mtim;
  32. struct timespec st_ctim;
  33. unsigned long __unused4;
  34. unsigned long __unused5;
  35. };
  36. struct kernel_stat64 {
  37. unsigned long long st_dev;
  38. unsigned char __pad0[4];
  39. #define _HAVE_STAT64___ST_INO
  40. unsigned long __st_ino;
  41. unsigned int st_mode;
  42. unsigned int st_nlink;
  43. unsigned long st_uid;
  44. unsigned long st_gid;
  45. unsigned long long st_rdev;
  46. unsigned char __pad3[4];
  47. long long st_size;
  48. unsigned long st_blksize;
  49. unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
  50. struct timespec st_atim;
  51. struct timespec st_mtim;
  52. struct timespec st_ctim;
  53. unsigned long long st_ino;
  54. #ifndef __ARM_EABI__
  55. } __attribute__((packed));
  56. #else
  57. };
  58. #endif
  59. #endif /* _BITS_STAT_STRUCT_H */