kernel_stat.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2016 Andes Technology, Inc.
  3. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  4. */
  5. #ifndef _BITS_STAT_STRUCT_H
  6. #define _BITS_STAT_STRUCT_H
  7. struct kernel_stat {
  8. #if defined(__NDS32_EB__)
  9. unsigned short st_dev;
  10. unsigned short __pad1;
  11. #else
  12. unsigned long st_dev;
  13. #endif
  14. unsigned long st_ino;
  15. unsigned short st_mode;
  16. unsigned short st_nlink;
  17. unsigned short st_uid;
  18. unsigned short st_gid;
  19. #if defined(__NDS32_EB__)
  20. unsigned short st_rdev;
  21. unsigned short __pad2;
  22. #else
  23. unsigned long st_rdev;
  24. #endif
  25. unsigned long st_size;
  26. unsigned long st_blksize;
  27. unsigned long st_blocks;
  28. struct timespec st_atim;
  29. struct timespec st_mtim;
  30. struct timespec st_ctim;
  31. unsigned long __uclibc_unused4;
  32. unsigned long __uclibc_unused5;
  33. };
  34. struct kernel_stat64 {
  35. unsigned long long st_dev;
  36. unsigned long __pad0;
  37. #define STAT64_HAS_BROKEN_ST_INO 1
  38. unsigned long __st_ino;
  39. unsigned int st_mode;
  40. unsigned int st_nlink;
  41. unsigned long st_uid;
  42. unsigned long st_gid;
  43. unsigned long long st_rdev;
  44. unsigned int __pad3;
  45. unsigned long long st_size;
  46. unsigned long st_blksize;
  47. unsigned long long st_blocks; // Number 512-byte blocks allocated.
  48. struct timespec st_atim; /* Time of last access. */
  49. struct timespec st_mtim; /* Time of last modification. */
  50. struct timespec st_ctim; /* Time of last status change. */
  51. unsigned long long st_ino;
  52. };
  53. #endif /* _BITS_STAT_STRUCT_H */