stat.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * include/asm-xtensa/stat.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_STAT_H
  11. #define _XTENSA_STAT_H
  12. #include <linux/types.h>
  13. #define STAT_HAVE_NSEC 1
  14. struct stat {
  15. unsigned long st_dev;
  16. ino_t st_ino;
  17. mode_t st_mode;
  18. nlink_t st_nlink;
  19. uid_t st_uid;
  20. gid_t st_gid;
  21. unsigned int st_rdev;
  22. off_t st_size;
  23. unsigned long st_blksize;
  24. unsigned long st_blocks;
  25. unsigned long st_atime;
  26. unsigned long st_atime_nsec;
  27. unsigned long st_mtime;
  28. unsigned long st_mtime_nsec;
  29. unsigned long st_ctime;
  30. unsigned long st_ctime_nsec;
  31. unsigned long __unused4;
  32. unsigned long __unused5;
  33. };
  34. /* This matches struct stat64 in glibc-2.3 */
  35. struct stat64 {
  36. unsigned long long st_dev; /* Device */
  37. unsigned long long st_ino; /* File serial number */
  38. unsigned int st_mode; /* File mode. */
  39. unsigned int st_nlink; /* Link count. */
  40. unsigned int st_uid; /* User ID of the file's owner. */
  41. unsigned int st_gid; /* Group ID of the file's group. */
  42. unsigned long long st_rdev; /* Device number, if device. */
  43. long long st_size; /* Size of file, in bytes. */
  44. long st_blksize; /* Optimal block size for I/O. */
  45. unsigned long __unused2;
  46. #ifdef __XTENSA_EB__
  47. unsigned long __unused3;
  48. long st_blocks; /* Number 512-byte blocks allocated. */
  49. #else
  50. long st_blocks; /* Number 512-byte blocks allocated. */
  51. unsigned long __unused3;
  52. #endif
  53. long st_atime; /* Time of last access. */
  54. unsigned long st_atime_nsec;
  55. long st_mtime; /* Time of last modification. */
  56. unsigned long st_mtime_nsec;
  57. long st_ctime; /* Time of last status change. */
  58. unsigned long st_ctime_nsec;
  59. unsigned long __unused4;
  60. unsigned long __unused5;
  61. };
  62. #endif /* _XTENSA_STAT_H */