stat.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (C) 2012 ARM Ltd.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef __ASM_STAT_H
  17. #define __ASM_STAT_H
  18. #include <asm-generic/stat.h>
  19. #ifdef __KERNEL__
  20. #ifdef CONFIG_COMPAT
  21. #include <asm/compat.h>
  22. /*
  23. * struct stat64 is needed for compat tasks only. Its definition is different
  24. * from the generic struct stat64.
  25. */
  26. struct stat64 {
  27. compat_u64 st_dev;
  28. unsigned char __pad0[4];
  29. #define STAT64_HAS_BROKEN_ST_INO 1
  30. compat_ulong_t __st_ino;
  31. compat_uint_t st_mode;
  32. compat_uint_t st_nlink;
  33. compat_ulong_t st_uid;
  34. compat_ulong_t st_gid;
  35. compat_u64 st_rdev;
  36. unsigned char __pad3[4];
  37. compat_s64 st_size;
  38. compat_ulong_t st_blksize;
  39. compat_u64 st_blocks; /* Number of 512-byte blocks allocated. */
  40. compat_ulong_t st_atime;
  41. compat_ulong_t st_atime_nsec;
  42. compat_ulong_t st_mtime;
  43. compat_ulong_t st_mtime_nsec;
  44. compat_ulong_t st_ctime;
  45. compat_ulong_t st_ctime_nsec;
  46. compat_u64 st_ino;
  47. };
  48. #endif
  49. #endif
  50. #endif