kernel_stat.h 2.1 KB

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