1 /*
2  * Copyright (C) 2017 Hangzhou C-SKY Microsystems co.,ltd.
3  *
4  * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB
5  * in this tarball.
6  */
7 
8 #ifndef _BITS_STAT_STRUCT_H
9 #define _BITS_STAT_STRUCT_H
10 
11 #define STAT_HAVE_NSEC 1
12 
13 struct kernel_stat {
14 #if defined(__cskyBE__)
15 	unsigned short st_dev;
16 	unsigned short __pad1;
17 #else
18 	unsigned long  st_dev;
19 #endif
20 	unsigned long  st_ino;
21 	unsigned short st_mode;
22 	unsigned short st_nlink;
23 	unsigned short st_uid;
24 	unsigned short st_gid;
25 #if defined(__cskyBE__)
26 	unsigned short st_rdev;
27 	unsigned short __pad2;
28 #else
29 	unsigned long  st_rdev;
30 #endif
31 	unsigned long  st_size;
32 	unsigned long  st_blksize;
33 	unsigned long  st_blocks;
34 	struct timespec st_atim;
35 	struct timespec st_mtim;
36 	struct timespec st_ctim;
37 	unsigned long  __uclibc_unused4;
38 	unsigned long  __uclibc_unused5;
39 };
40 
41 struct kernel_stat64 {
42 	unsigned long long  st_dev;
43 	unsigned char   __pad0[4];
44 
45 #define STAT64_HAS_BROKEN_ST_INO    1
46 	unsigned long   __st_ino;
47 	unsigned int    st_mode;
48 	unsigned int    st_nlink;
49 
50 	unsigned long   st_uid;
51 	unsigned long   st_gid;
52 
53 	unsigned long long  st_rdev;
54 	unsigned char   __pad3[4];
55 
56 	long long       st_size;
57 	unsigned long   st_blksize;
58 	unsigned long long  st_blocks;  /* Number 512-byte blocks allocated. */
59 
60 	struct timespec st_atim;
61 	struct timespec st_mtim;
62 	struct timespec st_ctim;
63 	unsigned long long  st_ino;
64 };
65 
66 #endif	/*  _BITS_STAT_STRUCT_H */
67 
68