kernel_stat.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Ripped from linux/include/asm-parisc/stat.h
  2. * and renamed 'struct stat' to 'struct kernel_stat' */
  3. #ifndef _BITS_STAT_STRUCT_H
  4. #define _BITS_STAT_STRUCT_H
  5. struct kernel_stat {
  6. unsigned int st_dev; /* dev_t is 32 bits on parisc */
  7. ino_t st_ino; /* 32 bits */
  8. mode_t st_mode; /* 16 bits */
  9. nlink_t st_nlink; /* 16 bits */
  10. unsigned short st_reserved1; /* old st_uid */
  11. unsigned short st_reserved2; /* old st_gid */
  12. unsigned int st_rdev;
  13. off_t st_size;
  14. struct timespec st_atim;
  15. struct timespec st_mtim;
  16. struct timespec st_ctim;
  17. int st_blksize;
  18. int st_blocks;
  19. unsigned int __unused1; /* ACL stuff */
  20. unsigned int __unused2; /* network */
  21. ino_t __unused3; /* network */
  22. unsigned int __unused4; /* cnodes */
  23. unsigned short __unused5; /* netsite */
  24. short st_fstype;
  25. unsigned int st_realdev;
  26. unsigned short st_basemode;
  27. unsigned short st_spareshort;
  28. uid_t st_uid;
  29. gid_t st_gid;
  30. unsigned int st_spare4[3];
  31. };
  32. /* This is the struct that 32-bit userspace applications are expecting.
  33. * How 64-bit apps are going to be compiled, I have no idea. But at least
  34. * this way, we don't have a wrapper in the kernel.
  35. */
  36. struct kernel_stat64 {
  37. unsigned long long st_dev;
  38. unsigned int __pad1;
  39. unsigned int __st_ino; /* Not actually filled in */
  40. unsigned int st_mode;
  41. unsigned int st_nlink;
  42. unsigned int st_uid;
  43. unsigned int st_gid;
  44. unsigned long long st_rdev;
  45. unsigned int __pad2;
  46. signed long long st_size;
  47. signed int st_blksize;
  48. signed long long st_blocks;
  49. struct timespec st_atim;
  50. struct timespec st_mtim;
  51. struct timespec st_ctim;
  52. unsigned long long st_ino;
  53. };
  54. #endif