kernel_stat.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. struct stat64 {
  29. unsigned long st_dev;
  30. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  31. unsigned long long st_ino;
  32. unsigned int st_mode;
  33. int st_nlink;
  34. int st_uid;
  35. int st_gid;
  36. unsigned long st_rdev;
  37. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  38. long long st_size;
  39. long st_atime;
  40. unsigned long reserved0; /* Reserved for st_atime expansion */
  41. long st_mtime;
  42. unsigned long reserved1; /* Reserved for st_mtime expansion */
  43. long st_ctime;
  44. unsigned long reserved2; /* Reserved for st_ctime expansion */
  45. unsigned long st_blksize;
  46. unsigned long st_pad2;
  47. long long st_blocks;
  48. };
  49. #else
  50. #ifndef __USE_FILE_OFFSET64
  51. struct stat {
  52. unsigned int st_dev;
  53. long st_pad1[3]; /* Reserved for network id */
  54. unsigned long st_ino;
  55. unsigned int st_mode;
  56. int st_nlink;
  57. int st_uid;
  58. int st_gid;
  59. unsigned int st_rdev;
  60. long st_pad2[2];
  61. long st_size;
  62. long st_pad3;
  63. long st_atime;
  64. long reserved0;
  65. long st_mtime;
  66. long reserved1;
  67. long st_ctime;
  68. long reserved2;
  69. long st_blksize;
  70. long st_blocks;
  71. long st_pad4[14];
  72. };
  73. #else
  74. struct stat {
  75. unsigned long st_dev;
  76. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  77. unsigned long long st_ino;
  78. unsigned int st_mode;
  79. int st_nlink;
  80. int st_uid;
  81. int st_gid;
  82. unsigned long st_rdev;
  83. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  84. long long st_size;
  85. long st_atime;
  86. unsigned long reserved0; /* Reserved for st_atime expansion */
  87. long st_mtime;
  88. unsigned long reserved1; /* Reserved for st_mtime expansion */
  89. long st_ctime;
  90. unsigned long reserved2; /* Reserved for st_ctime expansion */
  91. unsigned long st_blksize;
  92. unsigned long st_pad2;
  93. long long st_blocks;
  94. };
  95. #endif
  96. #ifdef __USE_LARGEFILE64
  97. struct stat64 {
  98. unsigned long st_dev;
  99. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  100. unsigned long long st_ino;
  101. unsigned int st_mode;
  102. int st_nlink;
  103. int st_uid;
  104. int st_gid;
  105. unsigned long st_rdev;
  106. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  107. long long st_size;
  108. long st_atime;
  109. unsigned long reserved0; /* Reserved for st_atime expansion */
  110. long st_mtime;
  111. unsigned long reserved1; /* Reserved for st_mtime expansion */
  112. long st_ctime;
  113. unsigned long reserved2; /* Reserved for st_ctime expansion */
  114. unsigned long st_blksize;
  115. unsigned long st_pad2;
  116. long long st_blocks;
  117. };
  118. #endif
  119. #endif
  120. #endif /* _BITS_STAT_STRUCT_H */