kernel_stat.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. unsigned long st_atime;
  24. unsigned long __unused1;
  25. unsigned long st_mtime;
  26. unsigned long __unused2;
  27. unsigned long st_ctime;
  28. unsigned long __unused3;
  29. unsigned long __unused4;
  30. unsigned long __unused5;
  31. };
  32. #endif
  33. struct kernel_stat64 {
  34. unsigned long long st_dev; /* Device. */
  35. unsigned long long st_ino; /* File serial number. */
  36. unsigned int st_mode; /* File mode. */
  37. unsigned int st_nlink; /* Link count. */
  38. unsigned int st_uid; /* User ID of the file's owner. */
  39. unsigned int st_gid; /* Group ID of the file's group. */
  40. unsigned long long st_rdev; /* Device number, if device. */
  41. unsigned short int __pad2;
  42. long long st_size; /* Size of file, in bytes. */
  43. long st_blksize; /* Optimal block size for I/O. */
  44. long long st_blocks; /* Number 512-byte blocks allocated. */
  45. long st_atime; /* Time of last access. */
  46. unsigned long int __unused1;
  47. long st_mtime; /* Time of last modification. */
  48. unsigned long int __unused2;
  49. long st_ctime; /* Time of last status change. */
  50. unsigned long int __unused3;
  51. unsigned long int __unused4;
  52. unsigned long int __unused5;
  53. };
  54. #endif /* _BITS_STAT_STRUCT_H */