kernel_stat.h 1.7 KB

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