xref: /openbmc/linux/arch/sh/include/uapi/asm/stat.h (revision 37744fee)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
20a9426dfSDavid Howells #ifndef __ASM_SH_STAT_H
30a9426dfSDavid Howells #define __ASM_SH_STAT_H
40a9426dfSDavid Howells 
50a9426dfSDavid Howells struct __old_kernel_stat {
60a9426dfSDavid Howells 	unsigned short st_dev;
70a9426dfSDavid Howells 	unsigned short st_ino;
80a9426dfSDavid Howells 	unsigned short st_mode;
90a9426dfSDavid Howells 	unsigned short st_nlink;
100a9426dfSDavid Howells 	unsigned short st_uid;
110a9426dfSDavid Howells 	unsigned short st_gid;
120a9426dfSDavid Howells 	unsigned short st_rdev;
130a9426dfSDavid Howells 	unsigned long  st_size;
140a9426dfSDavid Howells 	unsigned long  st_atime;
150a9426dfSDavid Howells 	unsigned long  st_mtime;
160a9426dfSDavid Howells 	unsigned long  st_ctime;
170a9426dfSDavid Howells };
180a9426dfSDavid Howells 
190a9426dfSDavid Howells struct stat {
200a9426dfSDavid Howells 	unsigned long  st_dev;
210a9426dfSDavid Howells 	unsigned long  st_ino;
220a9426dfSDavid Howells 	unsigned short st_mode;
230a9426dfSDavid Howells 	unsigned short st_nlink;
240a9426dfSDavid Howells 	unsigned short st_uid;
250a9426dfSDavid Howells 	unsigned short st_gid;
260a9426dfSDavid Howells 	unsigned long  st_rdev;
270a9426dfSDavid Howells 	unsigned long  st_size;
280a9426dfSDavid Howells 	unsigned long  st_blksize;
290a9426dfSDavid Howells 	unsigned long  st_blocks;
300a9426dfSDavid Howells 	unsigned long  st_atime;
310a9426dfSDavid Howells 	unsigned long  st_atime_nsec;
320a9426dfSDavid Howells 	unsigned long  st_mtime;
330a9426dfSDavid Howells 	unsigned long  st_mtime_nsec;
340a9426dfSDavid Howells 	unsigned long  st_ctime;
350a9426dfSDavid Howells 	unsigned long  st_ctime_nsec;
360a9426dfSDavid Howells 	unsigned long  __unused4;
370a9426dfSDavid Howells 	unsigned long  __unused5;
380a9426dfSDavid Howells };
390a9426dfSDavid Howells 
400a9426dfSDavid Howells /* This matches struct stat64 in glibc2.1, hence the absolutely
410a9426dfSDavid Howells  * insane amounts of padding around dev_t's.
420a9426dfSDavid Howells  */
430a9426dfSDavid Howells struct stat64 {
440a9426dfSDavid Howells 	unsigned long long	st_dev;
450a9426dfSDavid Howells 	unsigned char	__pad0[4];
460a9426dfSDavid Howells 
470a9426dfSDavid Howells #define STAT64_HAS_BROKEN_ST_INO	1
480a9426dfSDavid Howells 	unsigned long	__st_ino;
490a9426dfSDavid Howells 
500a9426dfSDavid Howells 	unsigned int	st_mode;
510a9426dfSDavid Howells 	unsigned int	st_nlink;
520a9426dfSDavid Howells 
530a9426dfSDavid Howells 	unsigned long	st_uid;
540a9426dfSDavid Howells 	unsigned long	st_gid;
550a9426dfSDavid Howells 
560a9426dfSDavid Howells 	unsigned long long	st_rdev;
570a9426dfSDavid Howells 	unsigned char	__pad3[4];
580a9426dfSDavid Howells 
590a9426dfSDavid Howells 	long long	st_size;
600a9426dfSDavid Howells 	unsigned long	st_blksize;
610a9426dfSDavid Howells 
620a9426dfSDavid Howells 	unsigned long long	st_blocks;	/* Number 512-byte blocks allocated. */
630a9426dfSDavid Howells 
640a9426dfSDavid Howells 	unsigned long	st_atime;
650a9426dfSDavid Howells 	unsigned long	st_atime_nsec;
660a9426dfSDavid Howells 
670a9426dfSDavid Howells 	unsigned long	st_mtime;
680a9426dfSDavid Howells 	unsigned long	st_mtime_nsec;
690a9426dfSDavid Howells 
700a9426dfSDavid Howells 	unsigned long	st_ctime;
710a9426dfSDavid Howells 	unsigned long	st_ctime_nsec;
720a9426dfSDavid Howells 
730a9426dfSDavid Howells 	unsigned long long	st_ino;
740a9426dfSDavid Howells };
750a9426dfSDavid Howells 
760a9426dfSDavid Howells #define STAT_HAVE_NSEC 1
770a9426dfSDavid Howells 
780a9426dfSDavid Howells #endif /* __ASM_SH_STAT_H */
79