xref: /openbmc/linux/arch/s390/include/uapi/asm/stat.h (revision 0883c2c0)
1 /*
2  *  S390 version
3  *
4  *  Derived from "include/asm-i386/stat.h"
5  */
6 
7 #ifndef _S390_STAT_H
8 #define _S390_STAT_H
9 
10 #ifndef __s390x__
11 struct __old_kernel_stat {
12         unsigned short st_dev;
13         unsigned short st_ino;
14         unsigned short st_mode;
15         unsigned short st_nlink;
16         unsigned short st_uid;
17         unsigned short st_gid;
18         unsigned short st_rdev;
19         unsigned long  st_size;
20         unsigned long  st_atime;
21         unsigned long  st_mtime;
22         unsigned long  st_ctime;
23 };
24 
25 struct stat {
26         unsigned short st_dev;
27         unsigned short __pad1;
28         unsigned long  st_ino;
29         unsigned short st_mode;
30         unsigned short st_nlink;
31         unsigned short st_uid;
32         unsigned short st_gid;
33         unsigned short st_rdev;
34         unsigned short __pad2;
35         unsigned long  st_size;
36         unsigned long  st_blksize;
37         unsigned long  st_blocks;
38         unsigned long  st_atime;
39         unsigned long  st_atime_nsec;
40         unsigned long  st_mtime;
41         unsigned long  st_mtime_nsec;
42         unsigned long  st_ctime;
43         unsigned long  st_ctime_nsec;
44         unsigned long  __unused4;
45         unsigned long  __unused5;
46 };
47 
48 /* This matches struct stat64 in glibc2.1, hence the absolutely
49  * insane amounts of padding around dev_t's.
50  */
51 struct stat64 {
52         unsigned long long	st_dev;
53         unsigned int    __pad1;
54 #define STAT64_HAS_BROKEN_ST_INO        1
55         unsigned long   __st_ino;
56         unsigned int    st_mode;
57         unsigned int    st_nlink;
58         unsigned long   st_uid;
59         unsigned long   st_gid;
60         unsigned long long	st_rdev;
61         unsigned int    __pad3;
62         long long	st_size;
63         unsigned long   st_blksize;
64         unsigned char   __pad4[4];
65         unsigned long   __pad5;     /* future possible st_blocks high bits */
66         unsigned long   st_blocks;  /* Number 512-byte blocks allocated. */
67         unsigned long   st_atime;
68         unsigned long   st_atime_nsec;
69         unsigned long   st_mtime;
70         unsigned long   st_mtime_nsec;
71         unsigned long   st_ctime;
72         unsigned long   st_ctime_nsec;  /* will be high 32 bits of ctime someday */
73         unsigned long long	st_ino;
74 };
75 
76 #else /* __s390x__ */
77 
78 struct stat {
79         unsigned long  st_dev;
80         unsigned long  st_ino;
81         unsigned long  st_nlink;
82         unsigned int   st_mode;
83         unsigned int   st_uid;
84         unsigned int   st_gid;
85         unsigned int   __pad1;
86         unsigned long  st_rdev;
87         unsigned long  st_size;
88         unsigned long  st_atime;
89 	unsigned long  st_atime_nsec;
90         unsigned long  st_mtime;
91 	unsigned long  st_mtime_nsec;
92         unsigned long  st_ctime;
93 	unsigned long  st_ctime_nsec;
94         unsigned long  st_blksize;
95         long           st_blocks;
96         unsigned long  __unused[3];
97 };
98 
99 #endif /* __s390x__ */
100 
101 #define STAT_HAVE_NSEC 1
102 
103 #endif
104