blob: e1810cc6e3da38276aaa3617f28cc80bfb682c50 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ASM_SH_STAT_H
2#define __ASM_SH_STAT_H
3
4struct __old_kernel_stat {
5 unsigned short st_dev;
6 unsigned short st_ino;
7 unsigned short st_mode;
8 unsigned short st_nlink;
9 unsigned short st_uid;
10 unsigned short st_gid;
11 unsigned short st_rdev;
12 unsigned long st_size;
13 unsigned long st_atime;
14 unsigned long st_mtime;
15 unsigned long st_ctime;
16};
17
Paul Mundt17bfa632007-11-21 17:28:37 +090018#if defined(__SH5__) || defined(CONFIG_CPU_SH5)
19struct stat {
20 unsigned short st_dev;
21 unsigned short __pad1;
22 unsigned long st_ino;
23 unsigned short st_mode;
24 unsigned short st_nlink;
25 unsigned short st_uid;
26 unsigned short st_gid;
27 unsigned short st_rdev;
28 unsigned short __pad2;
29 unsigned long st_size;
30 unsigned long st_blksize;
31 unsigned long st_blocks;
32 unsigned long st_atime;
33 unsigned long st_atime_nsec;
34 unsigned long st_mtime;
35 unsigned long st_mtime_nsec;
36 unsigned long st_ctime;
37 unsigned long st_ctime_nsec;
38 unsigned long __unused4;
39 unsigned long __unused5;
40};
41
42/* This matches struct stat64 in glibc2.1, hence the absolutely
43 * insane amounts of padding around dev_t's.
44 */
45struct stat64 {
46 unsigned short st_dev;
47 unsigned char __pad0[10];
48
49 unsigned long st_ino;
50 unsigned int st_mode;
51 unsigned int st_nlink;
52
53 unsigned long st_uid;
54 unsigned long st_gid;
55
56 unsigned short st_rdev;
57 unsigned char __pad3[10];
58
59 long long st_size;
60 unsigned long st_blksize;
61
62 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
63 unsigned long __pad4; /* future possible st_blocks high bits */
64
65 unsigned long st_atime;
66 unsigned long st_atime_nsec;
67
68 unsigned long st_mtime;
69 unsigned long st_mtime_nsec;
70
71 unsigned long st_ctime;
72 unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */
73
74 unsigned long __unused1;
75 unsigned long __unused2;
76};
77#else
Linus Torvalds1da177e2005-04-16 15:20:36 -070078struct stat {
SUGIOKA Toshinobu760bcb12007-03-30 14:51:44 +090079 unsigned long st_dev;
80 unsigned long st_ino;
Linus Torvalds1da177e2005-04-16 15:20:36 -070081 unsigned short st_mode;
82 unsigned short st_nlink;
83 unsigned short st_uid;
84 unsigned short st_gid;
SUGIOKA Toshinobu760bcb12007-03-30 14:51:44 +090085 unsigned long st_rdev;
Linus Torvalds1da177e2005-04-16 15:20:36 -070086 unsigned long st_size;
87 unsigned long st_blksize;
88 unsigned long st_blocks;
89 unsigned long st_atime;
90 unsigned long st_atime_nsec;
91 unsigned long st_mtime;
92 unsigned long st_mtime_nsec;
93 unsigned long st_ctime;
94 unsigned long st_ctime_nsec;
95 unsigned long __unused4;
96 unsigned long __unused5;
97};
98
Linus Torvalds1da177e2005-04-16 15:20:36 -070099/* This matches struct stat64 in glibc2.1, hence the absolutely
100 * insane amounts of padding around dev_t's.
101 */
102struct stat64 {
103 unsigned long long st_dev;
104 unsigned char __pad0[4];
105
SUGIOKA Toshinobu760bcb12007-03-30 14:51:44 +0900106#define STAT64_HAS_BROKEN_ST_INO 1
107 unsigned long __st_ino;
108
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109 unsigned int st_mode;
110 unsigned int st_nlink;
111
112 unsigned long st_uid;
113 unsigned long st_gid;
114
115 unsigned long long st_rdev;
116 unsigned char __pad3[4];
117
118 long long st_size;
119 unsigned long st_blksize;
120
Takashi Satoabcb6c92006-03-26 01:37:51 -0800121 unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122
123 unsigned long st_atime;
124 unsigned long st_atime_nsec;
125
126 unsigned long st_mtime;
127 unsigned long st_mtime_nsec;
128
129 unsigned long st_ctime;
Paul Mundt17bfa632007-11-21 17:28:37 +0900130 unsigned long st_ctime_nsec;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131
SUGIOKA Toshinobu760bcb12007-03-30 14:51:44 +0900132 unsigned long long st_ino;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133};
134
SUGIOKA Toshinobu760bcb12007-03-30 14:51:44 +0900135#define STAT_HAVE_NSEC 1
Paul Mundt17bfa632007-11-21 17:28:37 +0900136#endif
SUGIOKA Toshinobu760bcb12007-03-30 14:51:44 +0900137
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138#endif /* __ASM_SH_STAT_H */