kernel_stat.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. time_t st_atime;
  18. unsigned int st_atime_nsec;
  19. time_t st_mtime;
  20. unsigned int st_mtime_nsec;
  21. time_t st_ctime;
  22. unsigned int st_ctime_nsec;
  23. int st_blksize;
  24. int st_blocks;
  25. unsigned int __unused1; /* ACL stuff */
  26. unsigned int __unused2; /* network */
  27. ino_t __unused3; /* network */
  28. unsigned int __unused4; /* cnodes */
  29. unsigned short __unused5; /* netsite */
  30. short st_fstype;
  31. unsigned int st_realdev;
  32. unsigned short st_basemode;
  33. unsigned short st_spareshort;
  34. uid_t st_uid;
  35. gid_t st_gid;
  36. unsigned int st_spare4[3];
  37. };
  38. #define STAT_HAVE_NSEC 1
  39. /* This is the struct that 32-bit userspace applications are expecting.
  40. * How 64-bit apps are going to be compiled, I have no idea. But at least
  41. * this way, we don't have a wrapper in the kernel.
  42. */
  43. struct kernel_stat64 {
  44. unsigned long long st_dev;
  45. unsigned int __pad1;
  46. unsigned int __st_ino; /* Not actually filled in */
  47. unsigned int st_mode;
  48. unsigned int st_nlink;
  49. unsigned int st_uid;
  50. unsigned int st_gid;
  51. unsigned long long st_rdev;
  52. unsigned int __pad2;
  53. signed long long st_size;
  54. signed int st_blksize;
  55. signed long long st_blocks;
  56. signed int st_atime;
  57. unsigned int st_atime_nsec;
  58. signed int st_mtime;
  59. unsigned int st_mtime_nsec;
  60. signed int st_ctime;
  61. unsigned int st_ctime_nsec;
  62. unsigned long long st_ino;
  63. };
  64. #endif