kernel_stat.h 1.9 KB

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