stat.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. struct __old_kernel_stat {
  14. unsigned short st_dev;
  15. unsigned short st_ino;
  16. unsigned short st_mode;
  17. unsigned short st_nlink;
  18. unsigned short st_uid;
  19. unsigned short st_gid;
  20. unsigned short st_rdev;
  21. unsigned long st_size;
  22. unsigned long st_atime;
  23. unsigned long st_mtime;
  24. unsigned long st_ctime;
  25. };
  26. #define STAT_HAVE_NSEC 1
  27. struct stat {
  28. unsigned short st_dev;
  29. unsigned short __pad1;
  30. unsigned long st_ino;
  31. unsigned short st_mode;
  32. unsigned short st_nlink;
  33. unsigned short st_uid;
  34. unsigned short st_gid;
  35. unsigned short st_rdev;
  36. unsigned short __pad2;
  37. unsigned long st_size;
  38. unsigned long st_blksize;
  39. unsigned long st_blocks;
  40. unsigned long st_atime;
  41. unsigned long st_atime_nsec;
  42. unsigned long st_mtime;
  43. unsigned long st_mtime_nsec;
  44. unsigned long st_ctime;
  45. unsigned long st_ctime_nsec;
  46. unsigned long __unused4;
  47. unsigned long __unused5;
  48. };
  49. /* This matches struct stat64 in glibc-2.2.3. */
  50. struct stat64 {
  51. #ifdef __XTENSA_EL__
  52. unsigned short st_dev; /* Device */
  53. unsigned char __pad0[10];
  54. #else
  55. unsigned char __pad0[6];
  56. unsigned short st_dev;
  57. unsigned char __pad1[2];
  58. #endif
  59. #define STAT64_HAS_BROKEN_ST_INO 1
  60. unsigned long __st_ino; /* 32bit file serial number. */
  61. unsigned int st_mode; /* File mode. */
  62. unsigned int st_nlink; /* Link count. */
  63. unsigned int st_uid; /* User ID of the file's owner. */
  64. unsigned int st_gid; /* Group ID of the file's group. */
  65. #ifdef __XTENSA_EL__
  66. unsigned short st_rdev; /* Device number, if device. */
  67. unsigned char __pad3[10];
  68. #else
  69. unsigned char __pad2[6];
  70. unsigned short st_rdev;
  71. unsigned char __pad3[2];
  72. #endif
  73. long long int st_size; /* Size of file, in bytes. */
  74. long int st_blksize; /* Optimal block size for I/O. */
  75. #ifdef __XTENSA_EL__
  76. unsigned long st_blocks; /* Number 512-byte blocks allocated. */
  77. unsigned long __pad4;
  78. #else
  79. unsigned long __pad4;
  80. unsigned long st_blocks;
  81. #endif
  82. unsigned long __pad5;
  83. long int st_atime; /* Time of last access. */
  84. unsigned long st_atime_nsec;
  85. long int st_mtime; /* Time of last modification. */
  86. unsigned long st_mtime_nsec;
  87. long int st_ctime; /* Time of last status change. */
  88. unsigned long st_ctime_nsec;
  89. unsigned long long int st_ino; /* File serial number. */
  90. };
  91. #endif /* _XTENSA_STAT_H */