diff options
author | Riku Voipio <riku.voipio@iki.fi> | 2008-03-28 08:08:09 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-03-28 11:00:46 -0400 |
commit | c60afe1014dc4b8d2211fb6cc9dd08ebab31d00b (patch) | |
tree | 93e51816fd0ec592a3397f2506cf3740dc6add17 /arch/arm/kernel/sys_oabi-compat.c | |
parent | 3085354de635179d70c240e6d942bcbd1d93056c (diff) |
[ARM] 4878/1: Add oabi shim for fstatat64
Ccoreutils and other have started using fstatat64. Thus, we
need a shim for it if we want to support modern oldabi
userlands (such as Debian/arm/lenny) with EABI kernels.
See http://bugs.debian.org/462677
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Riku Voipio <riku.voipio@movial.fi>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/sys_oabi-compat.c')
-rw-r--r-- | arch/arm/kernel/sys_oabi-compat.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index e8b98046895b..96ab5f52949c 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * sys_stat64: | 25 | * sys_stat64: |
26 | * sys_lstat64: | 26 | * sys_lstat64: |
27 | * sys_fstat64: | 27 | * sys_fstat64: |
28 | * sys_fstatat64: | ||
28 | * | 29 | * |
29 | * struct stat64 has different sizes and some members are shifted | 30 | * struct stat64 has different sizes and some members are shifted |
30 | * Compatibility wrappers are needed for them and provided below. | 31 | * Compatibility wrappers are needed for them and provided below. |
@@ -169,6 +170,29 @@ asmlinkage long sys_oabi_fstat64(unsigned long fd, | |||
169 | return error; | 170 | return error; |
170 | } | 171 | } |
171 | 172 | ||
173 | asmlinkage long sys_oabi_fstatat64(int dfd, | ||
174 | char __user *filename, | ||
175 | struct oldabi_stat64 __user *statbuf, | ||
176 | int flag) | ||
177 | { | ||
178 | struct kstat stat; | ||
179 | int error = -EINVAL; | ||
180 | |||
181 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
182 | goto out; | ||
183 | |||
184 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
185 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
186 | else | ||
187 | error = vfs_stat_fd(dfd, filename, &stat); | ||
188 | |||
189 | if (!error) | ||
190 | error = cp_oldabi_stat64(&stat, statbuf); | ||
191 | |||
192 | out: | ||
193 | return error; | ||
194 | } | ||
195 | |||
172 | struct oabi_flock64 { | 196 | struct oabi_flock64 { |
173 | short l_type; | 197 | short l_type; |
174 | short l_whence; | 198 | short l_whence; |