kernel_stat.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #if defined(__UCLIBC_USE_TIME64__)
  7. #include "internal/time64_helpers.h"
  8. #endif
  9. struct kernel_stat {
  10. unsigned long st_dev;
  11. unsigned long st_ino;
  12. unsigned int st_mode;
  13. unsigned int st_nlink;
  14. unsigned int st_uid;
  15. unsigned int st_gid;
  16. unsigned long st_rdev;
  17. long st_size;
  18. unsigned long st_blksize;
  19. unsigned long st_blocks;
  20. #if defined(__UCLIBC_USE_TIME64__)
  21. struct __ts32_struct __st_atim32;
  22. struct __ts32_struct __st_mtim32;
  23. struct __ts32_struct __st_ctim32;
  24. #else
  25. struct timespec st_atim;
  26. struct timespec st_mtim;
  27. struct timespec st_ctim;
  28. #endif
  29. unsigned long __unused4;
  30. unsigned long __unused5;
  31. };
  32. struct kernel_stat64 {
  33. unsigned long long st_dev; /* Device */
  34. unsigned long long st_ino; /* File serial number */
  35. unsigned int st_mode; /* File mode. */
  36. unsigned int st_nlink; /* Link count. */
  37. unsigned int st_uid; /* User ID of the file's owner. */
  38. unsigned int st_gid; /* Group ID of the file's group. */
  39. unsigned long long st_rdev; /* Device number, if device. */
  40. long long st_size; /* Size of file, in bytes. */
  41. unsigned long st_blksize; /* Optimal block size for I/O. */
  42. unsigned long __uclibc_unused2;
  43. unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
  44. #if defined(__UCLIBC_USE_TIME64__)
  45. struct __ts32_struct __st_atim32;
  46. struct __ts32_struct __st_mtim32;
  47. struct __ts32_struct __st_ctim32;
  48. #else
  49. struct timespec st_atim; /* Time of last access. */
  50. struct timespec st_mtim; /* Time of last modification. */
  51. struct timespec st_ctim; /* Time of last status change. */
  52. #endif
  53. unsigned long __uclibc_unused4;
  54. unsigned long __uclibc_unused5;
  55. };
  56. #endif /* _BITS_STAT_STRUCT_H */