1 #ifndef _KERNEL_STAT_H
2 #define _KERNEL_STAT_H
3 
4 #include <sgidefs.h>
5 /* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the
6    userland data structures are not identical, because of different
7    padding.  */
8 /* Definition of `struct stat' used in the kernel.  */
9 #if _MIPS_SIM != _ABIO32
10 struct kernel_stat
11   {
12     unsigned int st_dev;
13     unsigned int __pad1[3];
14     unsigned long long st_ino;
15     unsigned int st_mode;
16     unsigned int st_nlink;
17     int st_uid;
18     int st_gid;
19     unsigned int st_rdev;
20     unsigned int __pad2[3];
21     long long st_size;
22     unsigned int st_atime_sec;
23     unsigned int st_atime_nsec;
24     unsigned int st_mtime_sec;
25     unsigned int st_mtime_nsec;
26     unsigned int st_ctime_sec;
27     unsigned int st_ctime_nsec;
28     unsigned int st_blksize;
29     unsigned int __pad3;
30     unsigned long long st_blocks;
31   };
32 #else
33 struct kernel_stat
34   {
35     unsigned long int st_dev;
36     long int __pad1[3];			/* Reserved for network id */
37     unsigned long int st_ino;
38     unsigned long int st_mode;
39     unsigned long int st_nlink;
40     long int st_uid;
41     long int st_gid;
42     unsigned long int st_rdev;
43     long int __pad2[2];
44     long int st_size;
45     long int __pad3;
46     unsigned int st_atime_sec;
47     unsigned int st_atime_nsec;
48     unsigned int st_mtime_sec;
49     unsigned int st_mtime_nsec;
50     unsigned int st_ctime_sec;
51     unsigned int st_ctime_nsec;
52     long int st_blksize;
53     long int st_blocks;
54     char st_fstype[16];			/* Filesystem type name, unsupported */
55     long st_pad4[8];
56     /* Linux specific fields */
57     unsigned int st_flags;
58     unsigned int st_gen;
59   };
60 #endif
61 
62 #define STAT_IS_KERNEL_STAT 0
63 #define STAT64_IS_KERNEL_STAT64 0
64 #define XSTAT_IS_XSTAT64 0
65 #if _MIPS_SIM == _ABI64
66 # define STATFS_IS_STATFS64 1
67 #else
68 # define STATFS_IS_STATFS64 0
69 #endif
70 /* MIPS64 has unsigned 32 bit timestamps fields, so use statx as well.  */
71 #if _MIPS_SIM == _ABI64
72 # define STAT_HAS_TIME32
73 #endif
74 
75 #endif
76