kernel_stat.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (C) 2017 Hangzhou C-SKY Microsystems co.,ltd.
  3. *
  4. * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB
  5. * in this tarball.
  6. */
  7. #ifndef _BITS_STAT_STRUCT_H
  8. #define _BITS_STAT_STRUCT_H
  9. #define STAT_HAVE_NSEC 1
  10. struct kernel_stat {
  11. #if defined(__cskyBE__)
  12. unsigned short st_dev;
  13. unsigned short __pad1;
  14. #else
  15. unsigned long st_dev;
  16. #endif
  17. unsigned long st_ino;
  18. unsigned short st_mode;
  19. unsigned short st_nlink;
  20. unsigned short st_uid;
  21. unsigned short st_gid;
  22. #if defined(__cskyBE__)
  23. unsigned short st_rdev;
  24. unsigned short __pad2;
  25. #else
  26. unsigned long st_rdev;
  27. #endif
  28. unsigned long st_size;
  29. unsigned long st_blksize;
  30. unsigned long st_blocks;
  31. struct timespec st_atim;
  32. struct timespec st_mtim;
  33. struct timespec st_ctim;
  34. unsigned long __uclibc_unused4;
  35. unsigned long __uclibc_unused5;
  36. };
  37. struct kernel_stat64 {
  38. unsigned long long st_dev;
  39. unsigned char __pad0[4];
  40. #define STAT64_HAS_BROKEN_ST_INO 1
  41. unsigned long __st_ino;
  42. unsigned int st_mode;
  43. unsigned int st_nlink;
  44. unsigned long st_uid;
  45. unsigned long st_gid;
  46. unsigned long long st_rdev;
  47. unsigned char __pad3[4];
  48. long long st_size;
  49. unsigned long st_blksize;
  50. unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
  51. struct timespec st_atim;
  52. struct timespec st_mtim;
  53. struct timespec st_ctim;
  54. unsigned long long st_ino;
  55. };
  56. #endif /* _BITS_STAT_STRUCT_H */