Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / sh / include / uapi / asm / stat.h
blob659b87c7c25a6d3c0c94cbd8b06e0488cb9a9a2d
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __ASM_SH_STAT_H
3 #define __ASM_SH_STAT_H
5 struct __old_kernel_stat {
6 unsigned short st_dev;
7 unsigned short st_ino;
8 unsigned short st_mode;
9 unsigned short st_nlink;
10 unsigned short st_uid;
11 unsigned short st_gid;
12 unsigned short st_rdev;
13 unsigned long st_size;
14 unsigned long st_atime;
15 unsigned long st_mtime;
16 unsigned long st_ctime;
19 #if defined(__SH5__) || defined(CONFIG_CPU_SH5)
20 struct stat {
21 unsigned short st_dev;
22 unsigned short __pad1;
23 unsigned long st_ino;
24 unsigned short st_mode;
25 unsigned short st_nlink;
26 unsigned short st_uid;
27 unsigned short st_gid;
28 unsigned short st_rdev;
29 unsigned short __pad2;
30 unsigned long st_size;
31 unsigned long st_blksize;
32 unsigned long st_blocks;
33 unsigned long st_atime;
34 unsigned long st_atime_nsec;
35 unsigned long st_mtime;
36 unsigned long st_mtime_nsec;
37 unsigned long st_ctime;
38 unsigned long st_ctime_nsec;
39 unsigned long __unused4;
40 unsigned long __unused5;
43 /* This matches struct stat64 in glibc2.1, hence the absolutely
44 * insane amounts of padding around dev_t's.
46 struct stat64 {
47 unsigned short st_dev;
48 unsigned char __pad0[10];
50 unsigned long st_ino;
51 unsigned int st_mode;
52 unsigned int st_nlink;
54 unsigned long st_uid;
55 unsigned long st_gid;
57 unsigned short st_rdev;
58 unsigned char __pad3[10];
60 long long st_size;
61 unsigned long st_blksize;
63 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
64 unsigned long __pad4; /* future possible st_blocks high bits */
66 unsigned long st_atime;
67 unsigned long st_atime_nsec;
69 unsigned long st_mtime;
70 unsigned long st_mtime_nsec;
72 unsigned long st_ctime;
73 unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */
75 unsigned long __unused1;
76 unsigned long __unused2;
78 #else
79 struct stat {
80 unsigned long st_dev;
81 unsigned long st_ino;
82 unsigned short st_mode;
83 unsigned short st_nlink;
84 unsigned short st_uid;
85 unsigned short st_gid;
86 unsigned long st_rdev;
87 unsigned long st_size;
88 unsigned long st_blksize;
89 unsigned long st_blocks;
90 unsigned long st_atime;
91 unsigned long st_atime_nsec;
92 unsigned long st_mtime;
93 unsigned long st_mtime_nsec;
94 unsigned long st_ctime;
95 unsigned long st_ctime_nsec;
96 unsigned long __unused4;
97 unsigned long __unused5;
100 /* This matches struct stat64 in glibc2.1, hence the absolutely
101 * insane amounts of padding around dev_t's.
103 struct stat64 {
104 unsigned long long st_dev;
105 unsigned char __pad0[4];
107 #define STAT64_HAS_BROKEN_ST_INO 1
108 unsigned long __st_ino;
110 unsigned int st_mode;
111 unsigned int st_nlink;
113 unsigned long st_uid;
114 unsigned long st_gid;
116 unsigned long long st_rdev;
117 unsigned char __pad3[4];
119 long long st_size;
120 unsigned long st_blksize;
122 unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
124 unsigned long st_atime;
125 unsigned long st_atime_nsec;
127 unsigned long st_mtime;
128 unsigned long st_mtime_nsec;
130 unsigned long st_ctime;
131 unsigned long st_ctime_nsec;
133 unsigned long long st_ino;
136 #define STAT_HAVE_NSEC 1
137 #endif
139 #endif /* __ASM_SH_STAT_H */