aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
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
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')
-rw-r--r--include/asm-x86/Kbuild2
-rw-r--r--include/asm-x86/stat.h123
-rw-r--r--include/asm-x86/stat_32.h77
-rw-r--r--include/asm-x86/stat_64.h44
4 files changed, 112 insertions, 134 deletions
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
index 6e839bcf5816..af183e8c5fd6 100644
--- a/include/asm-x86/Kbuild
+++ b/include/asm-x86/Kbuild
@@ -31,8 +31,6 @@ unifdef-y += sigcontext_32.h
31unifdef-y += sigcontext_64.h 31unifdef-y += sigcontext_64.h
32unifdef-y += signal_32.h 32unifdef-y += signal_32.h
33unifdef-y += signal_64.h 33unifdef-y += signal_64.h
34unifdef-y += stat_32.h
35unifdef-y += stat_64.h
36unifdef-y += statfs_32.h 34unifdef-y += statfs_32.h
37unifdef-y += statfs_64.h 35unifdef-y += statfs_64.h
38unifdef-y += unistd_32.h 36unifdef-y += unistd_32.h
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
diff --git a/include/asm-x86/stat_32.h b/include/asm-x86/stat_32.h
deleted file mode 100644
index 67eae78323ba..000000000000
--- a/include/asm-x86/stat_32.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef _I386_STAT_H
2#define _I386_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
18struct stat {
19 unsigned long st_dev;
20 unsigned long st_ino;
21 unsigned short st_mode;
22 unsigned short st_nlink;
23 unsigned short st_uid;
24 unsigned short st_gid;
25 unsigned long st_rdev;
26 unsigned long st_size;
27 unsigned long st_blksize;
28 unsigned long st_blocks;
29 unsigned long st_atime;
30 unsigned long st_atime_nsec;
31 unsigned long st_mtime;
32 unsigned long st_mtime_nsec;
33 unsigned long st_ctime;
34 unsigned long st_ctime_nsec;
35 unsigned long __unused4;
36 unsigned long __unused5;
37};
38
39/* This matches struct stat64 in glibc2.1, hence the absolutely
40 * insane amounts of padding around dev_t's.
41 */
42struct stat64 {
43 unsigned long long st_dev;
44 unsigned char __pad0[4];
45
46#define STAT64_HAS_BROKEN_ST_INO 1
47 unsigned long __st_ino;
48
49 unsigned int st_mode;
50 unsigned int st_nlink;
51
52 unsigned long st_uid;
53 unsigned long st_gid;
54
55 unsigned long long st_rdev;
56 unsigned char __pad3[4];
57
58 long long st_size;
59 unsigned long st_blksize;
60
61 unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
62
63 unsigned long st_atime;
64 unsigned long st_atime_nsec;
65
66 unsigned long st_mtime;
67 unsigned int st_mtime_nsec;
68
69 unsigned long st_ctime;
70 unsigned long st_ctime_nsec;
71
72 unsigned long long st_ino;
73};
74
75#define STAT_HAVE_NSEC 1
76
77#endif
diff --git a/include/asm-x86/stat_64.h b/include/asm-x86/stat_64.h
deleted file mode 100644
index fd9f00d560f8..000000000000
--- a/include/asm-x86/stat_64.h
+++ /dev/null
@@ -1,44 +0,0 @@
1#ifndef _ASM_X86_64_STAT_H
2#define _ASM_X86_64_STAT_H
3
4#define STAT_HAVE_NSEC 1
5
6struct stat {
7 unsigned long st_dev;
8 unsigned long st_ino;
9 unsigned long st_nlink;
10
11 unsigned int st_mode;
12 unsigned int st_uid;
13 unsigned int st_gid;
14 unsigned int __pad0;
15 unsigned long st_rdev;
16 long st_size;
17 long st_blksize;
18 long st_blocks; /* Number 512-byte blocks allocated. */
19
20 unsigned long st_atime;
21 unsigned long st_atime_nsec;
22 unsigned long st_mtime;
23 unsigned long st_mtime_nsec;
24 unsigned long st_ctime;
25 unsigned long st_ctime_nsec;
26 long __unused[3];
27};
28
29/* For 32bit emulation */
30struct __old_kernel_stat {
31 unsigned short st_dev;
32 unsigned short st_ino;
33 unsigned short st_mode;
34 unsigned short st_nlink;
35 unsigned short st_uid;
36 unsigned short st_gid;
37 unsigned short st_rdev;
38 unsigned int st_size;
39 unsigned int st_atime;
40 unsigned int st_mtime;
41 unsigned int st_ctime;
42};
43
44#endif