kernel_stat.h 1.7 KB

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