xref: /openbmc/linux/arch/arm/include/uapi/asm/stat.h (revision cb8db5d4)
1cb8db5d4SDavid Howells #ifndef _ASMARM_STAT_H
2cb8db5d4SDavid Howells #define _ASMARM_STAT_H
3cb8db5d4SDavid Howells 
4cb8db5d4SDavid Howells struct __old_kernel_stat {
5cb8db5d4SDavid Howells 	unsigned short st_dev;
6cb8db5d4SDavid Howells 	unsigned short st_ino;
7cb8db5d4SDavid Howells 	unsigned short st_mode;
8cb8db5d4SDavid Howells 	unsigned short st_nlink;
9cb8db5d4SDavid Howells 	unsigned short st_uid;
10cb8db5d4SDavid Howells 	unsigned short st_gid;
11cb8db5d4SDavid Howells 	unsigned short st_rdev;
12cb8db5d4SDavid Howells 	unsigned long  st_size;
13cb8db5d4SDavid Howells 	unsigned long  st_atime;
14cb8db5d4SDavid Howells 	unsigned long  st_mtime;
15cb8db5d4SDavid Howells 	unsigned long  st_ctime;
16cb8db5d4SDavid Howells };
17cb8db5d4SDavid Howells 
18cb8db5d4SDavid Howells #define STAT_HAVE_NSEC
19cb8db5d4SDavid Howells 
20cb8db5d4SDavid Howells struct stat {
21cb8db5d4SDavid Howells #if defined(__ARMEB__)
22cb8db5d4SDavid Howells 	unsigned short st_dev;
23cb8db5d4SDavid Howells 	unsigned short __pad1;
24cb8db5d4SDavid Howells #else
25cb8db5d4SDavid Howells 	unsigned long  st_dev;
26cb8db5d4SDavid Howells #endif
27cb8db5d4SDavid Howells 	unsigned long  st_ino;
28cb8db5d4SDavid Howells 	unsigned short st_mode;
29cb8db5d4SDavid Howells 	unsigned short st_nlink;
30cb8db5d4SDavid Howells 	unsigned short st_uid;
31cb8db5d4SDavid Howells 	unsigned short st_gid;
32cb8db5d4SDavid Howells #if defined(__ARMEB__)
33cb8db5d4SDavid Howells 	unsigned short st_rdev;
34cb8db5d4SDavid Howells 	unsigned short __pad2;
35cb8db5d4SDavid Howells #else
36cb8db5d4SDavid Howells 	unsigned long  st_rdev;
37cb8db5d4SDavid Howells #endif
38cb8db5d4SDavid Howells 	unsigned long  st_size;
39cb8db5d4SDavid Howells 	unsigned long  st_blksize;
40cb8db5d4SDavid Howells 	unsigned long  st_blocks;
41cb8db5d4SDavid Howells 	unsigned long  st_atime;
42cb8db5d4SDavid Howells 	unsigned long  st_atime_nsec;
43cb8db5d4SDavid Howells 	unsigned long  st_mtime;
44cb8db5d4SDavid Howells 	unsigned long  st_mtime_nsec;
45cb8db5d4SDavid Howells 	unsigned long  st_ctime;
46cb8db5d4SDavid Howells 	unsigned long  st_ctime_nsec;
47cb8db5d4SDavid Howells 	unsigned long  __unused4;
48cb8db5d4SDavid Howells 	unsigned long  __unused5;
49cb8db5d4SDavid Howells };
50cb8db5d4SDavid Howells 
51cb8db5d4SDavid Howells /* This matches struct stat64 in glibc2.1, hence the absolutely
52cb8db5d4SDavid Howells  * insane amounts of padding around dev_t's.
53cb8db5d4SDavid Howells  * Note: The kernel zero's the padded region because glibc might read them
54cb8db5d4SDavid Howells  * in the hope that the kernel has stretched to using larger sizes.
55cb8db5d4SDavid Howells  */
56cb8db5d4SDavid Howells struct stat64 {
57cb8db5d4SDavid Howells 	unsigned long long	st_dev;
58cb8db5d4SDavid Howells 	unsigned char   __pad0[4];
59cb8db5d4SDavid Howells 
60cb8db5d4SDavid Howells #define STAT64_HAS_BROKEN_ST_INO	1
61cb8db5d4SDavid Howells 	unsigned long	__st_ino;
62cb8db5d4SDavid Howells 	unsigned int	st_mode;
63cb8db5d4SDavid Howells 	unsigned int	st_nlink;
64cb8db5d4SDavid Howells 
65cb8db5d4SDavid Howells 	unsigned long	st_uid;
66cb8db5d4SDavid Howells 	unsigned long	st_gid;
67cb8db5d4SDavid Howells 
68cb8db5d4SDavid Howells 	unsigned long long	st_rdev;
69cb8db5d4SDavid Howells 	unsigned char   __pad3[4];
70cb8db5d4SDavid Howells 
71cb8db5d4SDavid Howells 	long long	st_size;
72cb8db5d4SDavid Howells 	unsigned long	st_blksize;
73cb8db5d4SDavid Howells 	unsigned long long st_blocks;	/* Number 512-byte blocks allocated. */
74cb8db5d4SDavid Howells 
75cb8db5d4SDavid Howells 	unsigned long	st_atime;
76cb8db5d4SDavid Howells 	unsigned long	st_atime_nsec;
77cb8db5d4SDavid Howells 
78cb8db5d4SDavid Howells 	unsigned long	st_mtime;
79cb8db5d4SDavid Howells 	unsigned long	st_mtime_nsec;
80cb8db5d4SDavid Howells 
81cb8db5d4SDavid Howells 	unsigned long	st_ctime;
82cb8db5d4SDavid Howells 	unsigned long	st_ctime_nsec;
83cb8db5d4SDavid Howells 
84cb8db5d4SDavid Howells 	unsigned long long	st_ino;
85cb8db5d4SDavid Howells };
86cb8db5d4SDavid Howells 
87cb8db5d4SDavid Howells #endif
88