xref: /openbmc/linux/arch/sparc/include/uapi/asm/stat.h (revision b34e08d5)
1 #ifndef __SPARC_STAT_H
2 #define __SPARC_STAT_H
3 
4 #include <linux/types.h>
5 
6 #if defined(__sparc__) && defined(__arch64__)
7 /* 64 bit sparc */
8 struct stat {
9 	unsigned   st_dev;
10 	ino_t   st_ino;
11 	mode_t  st_mode;
12 	short   st_nlink;
13 	uid_t   st_uid;
14 	gid_t   st_gid;
15 	unsigned   st_rdev;
16 	off_t   st_size;
17 	time_t  st_atime;
18 	time_t  st_mtime;
19 	time_t  st_ctime;
20 	off_t   st_blksize;
21 	off_t   st_blocks;
22 	unsigned long  __unused4[2];
23 };
24 
25 struct stat64 {
26 	unsigned long	st_dev;
27 	unsigned long	st_ino;
28 	unsigned long	st_nlink;
29 
30 	unsigned int	st_mode;
31 	unsigned int	st_uid;
32 	unsigned int	st_gid;
33 	unsigned int	__pad0;
34 
35 	unsigned long	st_rdev;
36 	long		st_size;
37 	long		st_blksize;
38 	long		st_blocks;
39 
40 	unsigned long	st_atime;
41 	unsigned long	st_atime_nsec;
42 	unsigned long	st_mtime;
43 	unsigned long	st_mtime_nsec;
44 	unsigned long	st_ctime;
45 	unsigned long	st_ctime_nsec;
46 	long		__unused[3];
47 };
48 
49 #else
50 /* 32 bit sparc */
51 struct stat {
52 	unsigned short	st_dev;
53 	ino_t		st_ino;
54 	mode_t		st_mode;
55 	short		st_nlink;
56 	unsigned short	st_uid;
57 	unsigned short	st_gid;
58 	unsigned short	st_rdev;
59 	off_t		st_size;
60 	time_t		st_atime;
61 	unsigned long	st_atime_nsec;
62 	time_t		st_mtime;
63 	unsigned long	st_mtime_nsec;
64 	time_t		st_ctime;
65 	unsigned long	st_ctime_nsec;
66 	off_t		st_blksize;
67 	off_t		st_blocks;
68 	unsigned long	__unused4[2];
69 };
70 
71 #define STAT_HAVE_NSEC 1
72 
73 struct stat64 {
74 	unsigned long long st_dev;
75 
76 	unsigned long long st_ino;
77 
78 	unsigned int	st_mode;
79 	unsigned int	st_nlink;
80 
81 	unsigned int	st_uid;
82 	unsigned int	st_gid;
83 
84 	unsigned long long st_rdev;
85 
86 	unsigned char	__pad3[8];
87 
88 	long long	st_size;
89 	unsigned int	st_blksize;
90 
91 	unsigned char	__pad4[8];
92 	unsigned int	st_blocks;
93 
94 	unsigned int	st_atime;
95 	unsigned int	st_atime_nsec;
96 
97 	unsigned int	st_mtime;
98 	unsigned int	st_mtime_nsec;
99 
100 	unsigned int	st_ctime;
101 	unsigned int	st_ctime_nsec;
102 
103 	unsigned int	__unused4;
104 	unsigned int	__unused5;
105 };
106 #endif /* defined(__sparc__) && defined(__arch64__) */
107 #endif /* __SPARC_STAT_H */
108