aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/stat.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-21 03:28:37 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:18:53 -0500
commit17bfa6397875e6901c3cafdc711437041664d94c (patch)
treeba1bac3002519578f9e528b76b02089b2c085fbc /include/asm-sh/stat.h
parentc8eef8800f1c693a2de6374b1948c8ea5e0ad75f (diff)
sh: Special layout for SH-5 stat.h and user.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/stat.h')
-rw-r--r--include/asm-sh/stat.h63
1 files changed, 62 insertions, 1 deletions
diff --git a/include/asm-sh/stat.h b/include/asm-sh/stat.h
index 6d6ad26e3a2..e1810cc6e3d 100644
--- a/include/asm-sh/stat.h
+++ b/include/asm-sh/stat.h
@@ -15,6 +15,66 @@ struct __old_kernel_stat {
15 unsigned long st_ctime; 15 unsigned long st_ctime;
16}; 16};
17 17
18#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
18struct stat { 78struct stat {
19 unsigned long st_dev; 79 unsigned long st_dev;
20 unsigned long st_ino; 80 unsigned long st_ino;
@@ -67,11 +127,12 @@ struct stat64 {
67 unsigned long st_mtime_nsec; 127 unsigned long st_mtime_nsec;
68 128
69 unsigned long st_ctime; 129 unsigned long st_ctime;
70 unsigned long st_ctime_nsec; 130 unsigned long st_ctime_nsec;
71 131
72 unsigned long long st_ino; 132 unsigned long long st_ino;
73}; 133};
74 134
75#define STAT_HAVE_NSEC 1 135#define STAT_HAVE_NSEC 1
136#endif
76 137
77#endif /* __ASM_SH_STAT_H */ 138#endif /* __ASM_SH_STAT_H */