kernel_stat.h 1.6 KB

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