1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _ASM_X86_STAT_H
3 #define _ASM_X86_STAT_H
5 #include <asm/posix_types.h>
7 #define STAT_HAVE_NSEC 1
13 unsigned short st_mode
;
14 unsigned short st_nlink
;
15 unsigned short st_uid
;
16 unsigned short st_gid
;
17 unsigned long st_rdev
;
18 unsigned long st_size
;
19 unsigned long st_blksize
;
20 unsigned long st_blocks
;
21 unsigned long st_atime
;
22 unsigned long st_atime_nsec
;
23 unsigned long st_mtime
;
24 unsigned long st_mtime_nsec
;
25 unsigned long st_ctime
;
26 unsigned long st_ctime_nsec
;
27 unsigned long __unused4
;
28 unsigned long __unused5
;
31 /* We don't need to memset the whole thing just to initialize the padding */
32 #define INIT_STRUCT_STAT_PADDING(st) do { \
37 #define STAT64_HAS_BROKEN_ST_INO 1
39 /* This matches struct stat64 in glibc2.1, hence the absolutely
40 * insane amounts of padding around dev_t's.
43 unsigned long long st_dev
;
44 unsigned char __pad0
[4];
46 unsigned long __st_ino
;
49 unsigned int st_nlink
;
54 unsigned long long st_rdev
;
55 unsigned char __pad3
[4];
58 unsigned long st_blksize
;
60 /* Number 512-byte blocks allocated. */
61 unsigned long long st_blocks
;
63 unsigned long st_atime
;
64 unsigned long st_atime_nsec
;
66 unsigned long st_mtime
;
67 unsigned int st_mtime_nsec
;
69 unsigned long st_ctime
;
70 unsigned long st_ctime_nsec
;
72 unsigned long long st_ino
;
75 /* We don't need to memset the whole thing just to initialize the padding */
76 #define INIT_STRUCT_STAT64_PADDING(st) do { \
77 memset(&st.__pad0, 0, sizeof(st.__pad0)); \
78 memset(&st.__pad3, 0, sizeof(st.__pad3)); \
84 __kernel_ulong_t st_dev
;
85 __kernel_ulong_t st_ino
;
86 __kernel_ulong_t st_nlink
;
92 __kernel_ulong_t st_rdev
;
93 __kernel_long_t st_size
;
94 __kernel_long_t st_blksize
;
95 __kernel_long_t st_blocks
; /* Number 512-byte blocks allocated. */
97 __kernel_ulong_t st_atime
;
98 __kernel_ulong_t st_atime_nsec
;
99 __kernel_ulong_t st_mtime
;
100 __kernel_ulong_t st_mtime_nsec
;
101 __kernel_ulong_t st_ctime
;
102 __kernel_ulong_t st_ctime_nsec
;
103 __kernel_long_t __unused
[3];
106 /* We don't need to memset the whole thing just to initialize the padding */
107 #define INIT_STRUCT_STAT_PADDING(st) do { \
109 st.__unused[0] = 0; \
110 st.__unused[1] = 0; \
111 st.__unused[2] = 0; \
116 /* for 32bit emulation and 32 bit kernels */
117 struct __old_kernel_stat
{
118 unsigned short st_dev
;
119 unsigned short st_ino
;
120 unsigned short st_mode
;
121 unsigned short st_nlink
;
122 unsigned short st_uid
;
123 unsigned short st_gid
;
124 unsigned short st_rdev
;
126 unsigned long st_size
;
127 unsigned long st_atime
;
128 unsigned long st_mtime
;
129 unsigned long st_ctime
;
131 unsigned int st_size
;
132 unsigned int st_atime
;
133 unsigned int st_mtime
;
134 unsigned int st_ctime
;
138 #endif /* _ASM_X86_STAT_H */