18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef _ASMARM_STAT_H
38c2ecf20Sopenharmony_ci#define _ASMARM_STAT_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_cistruct __old_kernel_stat {
68c2ecf20Sopenharmony_ci	unsigned short st_dev;
78c2ecf20Sopenharmony_ci	unsigned short st_ino;
88c2ecf20Sopenharmony_ci	unsigned short st_mode;
98c2ecf20Sopenharmony_ci	unsigned short st_nlink;
108c2ecf20Sopenharmony_ci	unsigned short st_uid;
118c2ecf20Sopenharmony_ci	unsigned short st_gid;
128c2ecf20Sopenharmony_ci	unsigned short st_rdev;
138c2ecf20Sopenharmony_ci	unsigned long  st_size;
148c2ecf20Sopenharmony_ci	unsigned long  st_atime;
158c2ecf20Sopenharmony_ci	unsigned long  st_mtime;
168c2ecf20Sopenharmony_ci	unsigned long  st_ctime;
178c2ecf20Sopenharmony_ci};
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#define STAT_HAVE_NSEC
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistruct stat {
228c2ecf20Sopenharmony_ci#if defined(__ARMEB__)
238c2ecf20Sopenharmony_ci	unsigned short st_dev;
248c2ecf20Sopenharmony_ci	unsigned short __pad1;
258c2ecf20Sopenharmony_ci#else
268c2ecf20Sopenharmony_ci	unsigned long  st_dev;
278c2ecf20Sopenharmony_ci#endif
288c2ecf20Sopenharmony_ci	unsigned long  st_ino;
298c2ecf20Sopenharmony_ci	unsigned short st_mode;
308c2ecf20Sopenharmony_ci	unsigned short st_nlink;
318c2ecf20Sopenharmony_ci	unsigned short st_uid;
328c2ecf20Sopenharmony_ci	unsigned short st_gid;
338c2ecf20Sopenharmony_ci#if defined(__ARMEB__)
348c2ecf20Sopenharmony_ci	unsigned short st_rdev;
358c2ecf20Sopenharmony_ci	unsigned short __pad2;
368c2ecf20Sopenharmony_ci#else
378c2ecf20Sopenharmony_ci	unsigned long  st_rdev;
388c2ecf20Sopenharmony_ci#endif
398c2ecf20Sopenharmony_ci	unsigned long  st_size;
408c2ecf20Sopenharmony_ci	unsigned long  st_blksize;
418c2ecf20Sopenharmony_ci	unsigned long  st_blocks;
428c2ecf20Sopenharmony_ci	unsigned long  st_atime;
438c2ecf20Sopenharmony_ci	unsigned long  st_atime_nsec;
448c2ecf20Sopenharmony_ci	unsigned long  st_mtime;
458c2ecf20Sopenharmony_ci	unsigned long  st_mtime_nsec;
468c2ecf20Sopenharmony_ci	unsigned long  st_ctime;
478c2ecf20Sopenharmony_ci	unsigned long  st_ctime_nsec;
488c2ecf20Sopenharmony_ci	unsigned long  __unused4;
498c2ecf20Sopenharmony_ci	unsigned long  __unused5;
508c2ecf20Sopenharmony_ci};
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci/* This matches struct stat64 in glibc2.1, hence the absolutely
538c2ecf20Sopenharmony_ci * insane amounts of padding around dev_t's.
548c2ecf20Sopenharmony_ci * Note: The kernel zero's the padded region because glibc might read them
558c2ecf20Sopenharmony_ci * in the hope that the kernel has stretched to using larger sizes.
568c2ecf20Sopenharmony_ci */
578c2ecf20Sopenharmony_cistruct stat64 {
588c2ecf20Sopenharmony_ci	unsigned long long	st_dev;
598c2ecf20Sopenharmony_ci	unsigned char   __pad0[4];
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#define STAT64_HAS_BROKEN_ST_INO	1
628c2ecf20Sopenharmony_ci	unsigned long	__st_ino;
638c2ecf20Sopenharmony_ci	unsigned int	st_mode;
648c2ecf20Sopenharmony_ci	unsigned int	st_nlink;
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci	unsigned long	st_uid;
678c2ecf20Sopenharmony_ci	unsigned long	st_gid;
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci	unsigned long long	st_rdev;
708c2ecf20Sopenharmony_ci	unsigned char   __pad3[4];
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci	long long	st_size;
738c2ecf20Sopenharmony_ci	unsigned long	st_blksize;
748c2ecf20Sopenharmony_ci	unsigned long long st_blocks;	/* Number 512-byte blocks allocated. */
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci	unsigned long	st_atime;
778c2ecf20Sopenharmony_ci	unsigned long	st_atime_nsec;
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci	unsigned long	st_mtime;
808c2ecf20Sopenharmony_ci	unsigned long	st_mtime_nsec;
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci	unsigned long	st_ctime;
838c2ecf20Sopenharmony_ci	unsigned long	st_ctime_nsec;
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci	unsigned long long	st_ino;
868c2ecf20Sopenharmony_ci};
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci#endif
89