kernel_stat.h 1.4 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. __kernel_dev_t st_dev;
  11. long st_pad1[3];
  12. __kernel_ino_t st_ino;
  13. __kernel_mode_t st_mode;
  14. __kernel_nlink_t st_nlink;
  15. __kernel_uid_t st_uid;
  16. __kernel_gid_t st_gid;
  17. __kernel_dev_t st_rdev;
  18. long st_pad2[2];
  19. __kernel_off_t st_size;
  20. long st_pad3;
  21. time_t st_atime;
  22. long reserved0;
  23. time_t st_mtime;
  24. long reserved1;
  25. time_t st_ctime;
  26. long reserved2;
  27. long st_blksize;
  28. long st_blocks;
  29. long st_pad4[14];
  30. };
  31. #endif
  32. struct kernel_stat64 {
  33. unsigned long st_dev;
  34. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  35. unsigned long long st_ino;
  36. __kernel_mode_t st_mode;
  37. __kernel_nlink_t st_nlink;
  38. __kernel_uid_t st_uid;
  39. __kernel_gid_t st_gid;
  40. unsigned long st_rdev;
  41. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  42. long long st_size;
  43. time_t st_atime;
  44. unsigned long reserved0; /* Reserved for st_atime expansion */
  45. time_t st_mtime;
  46. unsigned long reserved1; /* Reserved for st_mtime expansion */
  47. time_t st_ctime;
  48. unsigned long reserved2; /* Reserved for st_ctime expansion */
  49. unsigned long st_blksize;
  50. unsigned long st_pad2;
  51. long long st_blocks;
  52. };
  53. #endif /* _BITS_STAT_STRUCT_H */