kernel_stat.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 stat should look like... It turns out each arch has a
  5. * different opinion on the subject... */
  6. #if __WORDSIZE == 64
  7. struct stat {
  8. unsigned long st_dev;
  9. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  10. unsigned long long st_ino;
  11. unsigned int st_mode;
  12. int st_nlink;
  13. int st_uid;
  14. int st_gid;
  15. unsigned long st_rdev;
  16. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  17. long long st_size;
  18. long st_atime;
  19. unsigned long reserved0; /* Reserved for st_atime expansion */
  20. long st_mtime;
  21. unsigned long reserved1; /* Reserved for st_mtime expansion */
  22. long st_ctime;
  23. unsigned long reserved2; /* Reserved for st_ctime expansion */
  24. unsigned long st_blksize;
  25. unsigned long st_pad2;
  26. long long st_blocks;
  27. };
  28. #else
  29. struct stat {
  30. unsigned int st_dev;
  31. long st_pad1[3]; /* Reserved for network id */
  32. unsigned long st_ino;
  33. unsigned int st_mode;
  34. int st_nlink;
  35. int st_uid;
  36. int st_gid;
  37. unsigned int st_rdev;
  38. long st_pad2[2];
  39. long st_size;
  40. long st_pad3;
  41. long st_atime;
  42. long reserved0;
  43. long st_mtime;
  44. long reserved1;
  45. long st_ctime;
  46. long reserved2;
  47. long st_blksize;
  48. long st_blocks;
  49. long st_pad4[14];
  50. };
  51. #ifdef __USE_LARGEFILE64
  52. struct stat64 {
  53. unsigned long st_dev;
  54. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  55. unsigned long long st_ino;
  56. unsigned int st_mode;
  57. int st_nlink;
  58. int st_uid;
  59. int st_gid;
  60. unsigned long st_rdev;
  61. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  62. long long st_size;
  63. long st_atime;
  64. unsigned long reserved0; /* Reserved for st_atime expansion */
  65. long st_mtime;
  66. unsigned long reserved1; /* Reserved for st_mtime expansion */
  67. long st_ctime;
  68. unsigned long reserved2; /* Reserved for st_ctime expansion */
  69. unsigned long st_blksize;
  70. unsigned long st_pad2;
  71. long long st_blocks;
  72. };
  73. #endif
  74. #endif
  75. #endif /* _BITS_STAT_STRUCT_H */