kernel_stat.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #if __WORDSIZE == 64
  10. #define kernel_stat kernel_stat64
  11. #else
  12. struct kernel_stat {
  13. __kernel_dev_t st_dev;
  14. __kernel_ino_t st_ino;
  15. __kernel_mode_t st_mode;
  16. __kernel_nlink_t st_nlink;
  17. __kernel_uid_t st_uid;
  18. __kernel_gid_t st_gid;
  19. __kernel_dev_t st_rdev;
  20. __kernel_off_t st_size;
  21. unsigned long st_blksize;
  22. unsigned long st_blocks;
  23. struct timespec st_atim;
  24. struct timespec st_mtim;
  25. struct timespec st_ctim;
  26. unsigned long __unused4;
  27. unsigned long __unused5;
  28. };
  29. #endif
  30. struct kernel_stat64 {
  31. unsigned long long st_dev; /* Device. */
  32. unsigned long long st_ino; /* File serial number. */
  33. unsigned int st_mode; /* File mode. */
  34. unsigned int st_nlink; /* Link count. */
  35. unsigned int st_uid; /* User ID of the file's owner. */
  36. unsigned int st_gid; /* Group ID of the file's group. */
  37. unsigned long long st_rdev; /* Device number, if device. */
  38. unsigned short int __pad2;
  39. long long st_size; /* Size of file, in bytes. */
  40. long st_blksize; /* Optimal block size for I/O. */
  41. long long st_blocks; /* Number 512-byte blocks allocated. */
  42. struct timespec st_atim; /* Time of last access. */
  43. struct timespec st_mtim; /* Time of last modification. */
  44. struct timespec st_ctim; /* Time of last status change. */
  45. unsigned long int __unused4;
  46. unsigned long int __unused5;
  47. };
  48. #endif /* _BITS_STAT_STRUCT_H */