kernel_stat.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. 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. time_t st_atime;
  15. unsigned int st_atime_nsec;
  16. time_t st_mtime;
  17. unsigned int st_mtime_nsec;
  18. time_t st_ctime;
  19. unsigned int st_ctime_nsec;
  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. #define STAT_HAVE_NSEC 1
  36. /* This is the struct that 32-bit userspace applications are expecting.
  37. * How 64-bit apps are going to be compiled, I have no idea. But at least
  38. * this way, we don't have a wrapper in the kernel.
  39. */
  40. struct kernel_stat64 {
  41. unsigned long long st_dev;
  42. unsigned int __pad1;
  43. unsigned int __st_ino; /* Not actually filled in */
  44. unsigned int st_mode;
  45. unsigned int st_nlink;
  46. unsigned int st_uid;
  47. unsigned int st_gid;
  48. unsigned long long st_rdev;
  49. unsigned int __pad2;
  50. signed long long st_size;
  51. signed int st_blksize;
  52. signed long long st_blocks;
  53. signed int st_atime;
  54. unsigned int st_atime_nsec;
  55. signed int st_mtime;
  56. unsigned int st_mtime_nsec;
  57. signed int st_ctime;
  58. unsigned int st_ctime_nsec;
  59. unsigned long long st_ino;
  60. };
  61. #endif