stat.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 <uapi/asm/stat.h>
  19. #ifdef CONFIG_COMPAT
  20. #include <asm/compat.h>
  21. /*
  22. * struct stat64 is needed for compat tasks only. Its definition is different
  23. * from the generic struct stat64.
  24. */
  25. struct stat64 {
  26. compat_u64 st_dev;
  27. unsigned char __pad0[4];
  28. #define STAT64_HAS_BROKEN_ST_INO 1
  29. compat_ulong_t __st_ino;
  30. compat_uint_t st_mode;
  31. compat_uint_t st_nlink;
  32. compat_ulong_t st_uid;
  33. compat_ulong_t st_gid;
  34. compat_u64 st_rdev;
  35. unsigned char __pad3[4];
  36. compat_s64 st_size;
  37. compat_ulong_t st_blksize;
  38. compat_u64 st_blocks; /* Number of 512-byte blocks allocated. */
  39. compat_ulong_t st_atime;
  40. compat_ulong_t st_atime_nsec;
  41. compat_ulong_t st_mtime;
  42. compat_ulong_t st_mtime_nsec;
  43. compat_ulong_t st_ctime;
  44. compat_ulong_t st_ctime_nsec;
  45. compat_u64 st_ino;
  46. };
  47. #endif
  48. #endif