aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/stat.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-10-23 16:37:24 -0400
committerThomas Gleixner <tglx@linutronix.de>2007-10-23 16:37:24 -0400
commit79c74977045a3f1f5eeb45241198fa3d6970c85f (patch)
treea8b3d3cde83ca104246c12d1006515dc108db658 /include/asm-x86/stat.h
parent079091a450ed5a0001c2ee9dadd8ddaceddb91b5 (diff)
x86: merge stat_32/64.h
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/stat.h')
-rw-r--r--include/asm-x86/stat.h123
1 files changed, 112 insertions, 11 deletions
diff --git a/include/asm-x86/stat.h b/include/asm-x86/stat.h
index 3ff6b50ef833..5c22dcb5d17e 100644
--- a/include/asm-x86/stat.h
+++ b/include/asm-x86/stat.h
@@ -1,13 +1,114 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_STAT_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_STAT_H
3# include "stat_32.h" 3
4# else 4#define STAT_HAVE_NSEC 1
5# include "stat_64.h" 5
6# endif 6#ifdef __i386__
7struct stat {
8 unsigned long st_dev;
9 unsigned long st_ino;
10 unsigned short st_mode;
11 unsigned short st_nlink;
12 unsigned short st_uid;
13 unsigned short st_gid;
14 unsigned long st_rdev;
15 unsigned long st_size;
16 unsigned long st_blksize;
17 unsigned long st_blocks;
18 unsigned long st_atime;
19 unsigned long st_atime_nsec;
20 unsigned long st_mtime;
21 unsigned long st_mtime_nsec;
22 unsigned long st_ctime;
23 unsigned long st_ctime_nsec;
24 unsigned long __unused4;
25 unsigned long __unused5;
26};
27
28#define STAT64_HAS_BROKEN_ST_INO 1
29
30/* This matches struct stat64 in glibc2.1, hence the absolutely
31 * insane amounts of padding around dev_t's.
32 */
33struct stat64 {
34 unsigned long long st_dev;
35 unsigned char __pad0[4];
36
37 unsigned long __st_ino;
38
39 unsigned int st_mode;
40 unsigned int st_nlink;
41
42 unsigned long st_uid;
43 unsigned long st_gid;
44
45 unsigned long long st_rdev;
46 unsigned char __pad3[4];
47
48 long long st_size;
49 unsigned long st_blksize;
50
51 /* Number 512-byte blocks allocated. */
52 unsigned long long st_blocks;
53
54 unsigned long st_atime;
55 unsigned long st_atime_nsec;
56
57 unsigned long st_mtime;
58 unsigned int st_mtime_nsec;
59
60 unsigned long st_ctime;
61 unsigned long st_ctime_nsec;
62
63 unsigned long long st_ino;
64};
65
66#else /* __i386__ */
67
68struct stat {
69 unsigned long st_dev;
70 unsigned long st_ino;
71 unsigned long st_nlink;
72
73 unsigned int st_mode;
74 unsigned int st_uid;
75 unsigned int st_gid;
76 unsigned int __pad0;
77 unsigned long st_rdev;
78 long st_size;
79 long st_blksize;
80 long st_blocks; /* Number 512-byte blocks allocated. */
81
82 unsigned long st_atime;
83 unsigned long st_atime_nsec;
84 unsigned long st_mtime;
85 unsigned long st_mtime_nsec;
86 unsigned long st_ctime;
87 unsigned long st_ctime_nsec;
88 long __unused[3];
89};
90#endif
91
92/* for 32bit emulation and 32 bit kernels */
93struct __old_kernel_stat {
94 unsigned short st_dev;
95 unsigned short st_ino;
96 unsigned short st_mode;
97 unsigned short st_nlink;
98 unsigned short st_uid;
99 unsigned short st_gid;
100 unsigned short st_rdev;
101#ifdef __i386__
102 unsigned long st_size;
103 unsigned long st_atime;
104 unsigned long st_mtime;
105 unsigned long st_ctime;
7#else 106#else
8# ifdef __i386__ 107 unsigned int st_size;
9# include "stat_32.h" 108 unsigned int st_atime;
10# else 109 unsigned int st_mtime;
11# include "stat_64.h" 110 unsigned int st_ctime;
12# endif 111#endif
112};
113
13#endif 114#endif