kernel_stat.h 1.5 KB

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