kernel_stat.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. unsigned long st_atime;
  21. unsigned long __unused1;
  22. unsigned long st_mtime;
  23. unsigned long __unused2;
  24. unsigned long st_ctime;
  25. unsigned long __unused3;
  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. long st_atime; /* Time of last access. */
  43. unsigned long int __unused1;
  44. long st_mtime; /* Time of last modification. */
  45. unsigned long int __unused2;
  46. long st_ctime; /* Time of last status change. */
  47. unsigned long int __unused3;
  48. unsigned long int __unused4;
  49. unsigned long int __unused5;
  50. };
  51. #endif /* _BITS_STAT_STRUCT_H */