18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef __SPARC_STAT_H
38c2ecf20Sopenharmony_ci#define __SPARC_STAT_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/types.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#if defined(__sparc__) && defined(__arch64__)
88c2ecf20Sopenharmony_ci/* 64 bit sparc */
98c2ecf20Sopenharmony_cistruct stat {
108c2ecf20Sopenharmony_ci	unsigned int st_dev;
118c2ecf20Sopenharmony_ci	ino_t   st_ino;
128c2ecf20Sopenharmony_ci	mode_t  st_mode;
138c2ecf20Sopenharmony_ci	short   st_nlink;
148c2ecf20Sopenharmony_ci	uid_t   st_uid;
158c2ecf20Sopenharmony_ci	gid_t   st_gid;
168c2ecf20Sopenharmony_ci	unsigned int st_rdev;
178c2ecf20Sopenharmony_ci	long    st_size;
188c2ecf20Sopenharmony_ci	long    st_atime;
198c2ecf20Sopenharmony_ci	long    st_mtime;
208c2ecf20Sopenharmony_ci	long    st_ctime;
218c2ecf20Sopenharmony_ci	long    st_blksize;
228c2ecf20Sopenharmony_ci	long    st_blocks;
238c2ecf20Sopenharmony_ci	unsigned long  __unused4[2];
248c2ecf20Sopenharmony_ci};
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_cistruct stat64 {
278c2ecf20Sopenharmony_ci	unsigned long	st_dev;
288c2ecf20Sopenharmony_ci	unsigned long	st_ino;
298c2ecf20Sopenharmony_ci	unsigned long	st_nlink;
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci	unsigned int	st_mode;
328c2ecf20Sopenharmony_ci	unsigned int	st_uid;
338c2ecf20Sopenharmony_ci	unsigned int	st_gid;
348c2ecf20Sopenharmony_ci	unsigned int	__pad0;
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci	unsigned long	st_rdev;
378c2ecf20Sopenharmony_ci	long		st_size;
388c2ecf20Sopenharmony_ci	long		st_blksize;
398c2ecf20Sopenharmony_ci	long		st_blocks;
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci	unsigned long	st_atime;
428c2ecf20Sopenharmony_ci	unsigned long	st_atime_nsec;
438c2ecf20Sopenharmony_ci	unsigned long	st_mtime;
448c2ecf20Sopenharmony_ci	unsigned long	st_mtime_nsec;
458c2ecf20Sopenharmony_ci	unsigned long	st_ctime;
468c2ecf20Sopenharmony_ci	unsigned long	st_ctime_nsec;
478c2ecf20Sopenharmony_ci	long		__unused[3];
488c2ecf20Sopenharmony_ci};
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci#else
518c2ecf20Sopenharmony_ci/* 32 bit sparc */
528c2ecf20Sopenharmony_cistruct stat {
538c2ecf20Sopenharmony_ci	unsigned short	st_dev;
548c2ecf20Sopenharmony_ci	ino_t		st_ino;
558c2ecf20Sopenharmony_ci	mode_t		st_mode;
568c2ecf20Sopenharmony_ci	short		st_nlink;
578c2ecf20Sopenharmony_ci	unsigned short	st_uid;
588c2ecf20Sopenharmony_ci	unsigned short	st_gid;
598c2ecf20Sopenharmony_ci	unsigned short	st_rdev;
608c2ecf20Sopenharmony_ci	long		st_size;
618c2ecf20Sopenharmony_ci	long		st_atime;
628c2ecf20Sopenharmony_ci	unsigned long	st_atime_nsec;
638c2ecf20Sopenharmony_ci	long		st_mtime;
648c2ecf20Sopenharmony_ci	unsigned long	st_mtime_nsec;
658c2ecf20Sopenharmony_ci	long		st_ctime;
668c2ecf20Sopenharmony_ci	unsigned long	st_ctime_nsec;
678c2ecf20Sopenharmony_ci	long		st_blksize;
688c2ecf20Sopenharmony_ci	long		st_blocks;
698c2ecf20Sopenharmony_ci	unsigned long	__unused4[2];
708c2ecf20Sopenharmony_ci};
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci#define STAT_HAVE_NSEC 1
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_cistruct stat64 {
758c2ecf20Sopenharmony_ci	unsigned long long st_dev;
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci	unsigned long long st_ino;
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci	unsigned int	st_mode;
808c2ecf20Sopenharmony_ci	unsigned int	st_nlink;
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci	unsigned int	st_uid;
838c2ecf20Sopenharmony_ci	unsigned int	st_gid;
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci	unsigned long long st_rdev;
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci	unsigned char	__pad3[8];
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci	long long	st_size;
908c2ecf20Sopenharmony_ci	unsigned int	st_blksize;
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci	unsigned char	__pad4[8];
938c2ecf20Sopenharmony_ci	unsigned int	st_blocks;
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci	unsigned int	st_atime;
968c2ecf20Sopenharmony_ci	unsigned int	st_atime_nsec;
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci	unsigned int	st_mtime;
998c2ecf20Sopenharmony_ci	unsigned int	st_mtime_nsec;
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci	unsigned int	st_ctime;
1028c2ecf20Sopenharmony_ci	unsigned int	st_ctime_nsec;
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci	unsigned int	__unused4;
1058c2ecf20Sopenharmony_ci	unsigned int	__unused5;
1068c2ecf20Sopenharmony_ci};
1078c2ecf20Sopenharmony_ci#endif /* defined(__sparc__) && defined(__arch64__) */
1088c2ecf20Sopenharmony_ci#endif /* __SPARC_STAT_H */
109