kernel_stat.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 char __pad0[6];
  31. unsigned short st_dev;
  32. unsigned long long st_ino;
  33. unsigned int st_mode;
  34. unsigned int st_nlink;
  35. unsigned int st_uid;
  36. unsigned int st_gid;
  37. unsigned char __pad2[6];
  38. unsigned short st_rdev;
  39. unsigned char __pad3[8];
  40. long long st_size;
  41. unsigned int st_blksize;
  42. unsigned char __pad4[8];
  43. unsigned int st_blocks;
  44. unsigned int st_atime;
  45. unsigned int __unused1;
  46. unsigned int st_mtime;
  47. unsigned int __unused2;
  48. unsigned int st_ctime;
  49. unsigned int __unused3;
  50. unsigned int __unused4;
  51. unsigned int __unused5;
  52. };
  53. #endif /* _BITS_STAT_STRUCT_H */