kernel_stat.h 1.3 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 short st_dev;
  11. unsigned long st_ino;
  12. unsigned short st_mode;
  13. short st_nlink;
  14. unsigned short st_uid;
  15. unsigned short st_gid;
  16. unsigned short st_rdev;
  17. long st_size;
  18. long st_atime;
  19. unsigned long __unused1;
  20. long st_mtime;
  21. unsigned long __unused2;
  22. long st_ctime;
  23. unsigned long __unused3;
  24. long st_blksize;
  25. long st_blocks;
  26. unsigned long __unused4[2];
  27. };
  28. #endif
  29. struct kernel_stat64 {
  30. unsigned long long st_dev;
  31. unsigned long long st_ino;
  32. unsigned int st_mode;
  33. unsigned int st_nlink;
  34. unsigned int st_uid;
  35. unsigned int st_gid;
  36. unsigned long long st_rdev;
  37. unsigned char __pad3[8];
  38. long long st_size;
  39. unsigned int st_blksize;
  40. unsigned char __pad4[8];
  41. unsigned int st_blocks;
  42. unsigned int st_atime;
  43. unsigned int st_atime_nsec;
  44. unsigned int st_mtime;
  45. unsigned int st_mtime_nsec;
  46. unsigned int st_ctime;
  47. unsigned int st_ctime_nsec;
  48. unsigned int __unused4;
  49. unsigned int __unused5;
  50. };
  51. #endif /* _BITS_STAT_STRUCT_H */