~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/uapi/asm/stat.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _ASM_X86_STAT_H
  3 #define _ASM_X86_STAT_H
  4 
  5 #include <asm/posix_types.h>
  6 
  7 #define STAT_HAVE_NSEC 1
  8 
  9 #ifdef __i386__
 10 struct stat {
 11         unsigned long  st_dev;
 12         unsigned long  st_ino;
 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;
 29 };
 30 
 31 /* We don't need to memset the whole thing just to initialize the padding */
 32 #define INIT_STRUCT_STAT_PADDING(st) do {       \
 33         st.__unused4 = 0;                       \
 34         st.__unused5 = 0;                       \
 35 } while (0)
 36 
 37 #define STAT64_HAS_BROKEN_ST_INO        1
 38 
 39 /* This matches struct stat64 in glibc2.1, hence the absolutely
 40  * insane amounts of padding around dev_t's.
 41  */
 42 struct stat64 {
 43         unsigned long long      st_dev;
 44         unsigned char   __pad0[4];
 45 
 46         unsigned long   __st_ino;
 47 
 48         unsigned int    st_mode;
 49         unsigned int    st_nlink;
 50 
 51         unsigned long   st_uid;
 52         unsigned long   st_gid;
 53 
 54         unsigned long long      st_rdev;
 55         unsigned char   __pad3[4];
 56 
 57         long long       st_size;
 58         unsigned long   st_blksize;
 59 
 60         /* Number 512-byte blocks allocated. */
 61         unsigned long long      st_blocks;
 62 
 63         unsigned long   st_atime;
 64         unsigned long   st_atime_nsec;
 65 
 66         unsigned long   st_mtime;
 67         unsigned int    st_mtime_nsec;
 68 
 69         unsigned long   st_ctime;
 70         unsigned long   st_ctime_nsec;
 71 
 72         unsigned long long      st_ino;
 73 };
 74 
 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));       \
 79 } while (0)
 80 
 81 #else /* __i386__ */
 82 
 83 struct stat {
 84         __kernel_ulong_t        st_dev;
 85         __kernel_ulong_t        st_ino;
 86         __kernel_ulong_t        st_nlink;
 87 
 88         unsigned int            st_mode;
 89         unsigned int            st_uid;
 90         unsigned int            st_gid;
 91         unsigned int            __pad0;
 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. */
 96 
 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];
104 };
105 
106 /* We don't need to memset the whole thing just to initialize the padding */
107 #define INIT_STRUCT_STAT_PADDING(st) do {       \
108         st.__pad0 = 0;                          \
109         st.__unused[0] = 0;                     \
110         st.__unused[1] = 0;                     \
111         st.__unused[2] = 0;                     \
112 } while (0)
113 
114 #endif
115 
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;
125 #ifdef __i386__
126         unsigned long  st_size;
127         unsigned long  st_atime;
128         unsigned long  st_mtime;
129         unsigned long  st_ctime;
130 #else
131         unsigned int  st_size;
132         unsigned int  st_atime;
133         unsigned int  st_mtime;
134         unsigned int  st_ctime;
135 #endif
136 };
137 
138 #endif /* _ASM_X86_STAT_H */
139 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php