summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-02-12 12:35:03 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-12 10:11:58 -0800
commit19bf9cbf6b313ae79a0c7278ccaa9c72c86931bd (patch)
tree957055cc4aec4db615cfd9726777b0815ca405ac /arch/s390
parentbc6d7fdf460ec5292d66bb551dbfa49ca682bebf (diff)
downloadlinux-3.10-19bf9cbf6b313ae79a0c7278ccaa9c72c86931bd.tar.gz
linux-3.10-19bf9cbf6b313ae79a0c7278ccaa9c72c86931bd.tar.bz2
linux-3.10-19bf9cbf6b313ae79a0c7278ccaa9c72c86931bd.zip
[PATCH] s390: fstatat64 support
Add fstatat64 support to s390 in order to follow changes with commit cff2b760096d1e6feaa31948e7af4abbefe47822 . Also fixes compilation for 31 bit. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/compat_linux.c20
-rw-r--r--arch/s390/kernel/compat_wrapper.S8
-rw-r--r--arch/s390/kernel/syscalls.S2
3 files changed, 25 insertions, 5 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index cc20f0e3a7d..2d021626c1a 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -905,6 +905,26 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta
return ret;
}
+asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename,
+ struct stat64_emu31 __user* statbuf, int flag)
+{
+ struct kstat stat;
+ int error = -EINVAL;
+
+ if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
+ goto out;
+
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ error = vfs_lstat_fd(dfd, filename, &stat);
+ else
+ error = vfs_stat_fd(dfd, filename, &stat);
+
+ if (!error)
+ error = cp_stat64(statbuf, &stat);
+out:
+ return error;
+}
+
/*
* Linux/i386 didn't use to be able to handle more than
* 4 system call parameters, so these system calls used a memory
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 38a6ef5ec62..dd2d6c3e8df 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1523,13 +1523,13 @@ compat_sys_futimesat_wrapper:
llgtr %r4,%r4 # struct timeval *
jg compat_sys_futimesat
- .globl compat_sys_newfstatat_wrapper
-compat_sys_newfstatat_wrapper:
+ .globl sys32_fstatat_wrapper
+sys32_fstatat_wrapper:
llgfr %r2,%r2 # unsigned int
llgtr %r3,%r3 # char *
- llgtr %r4,%r4 # struct stat *
+ llgtr %r4,%r4 # struct stat64 *
lgfr %r5,%r5 # int
- jg compat_sys_newfstatat
+ jg sys32_fstatat
.globl sys_unlinkat_wrapper
sys_unlinkat_wrapper:
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index e86a4debb16..84921fe8d26 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -301,7 +301,7 @@ SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper)
SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */
SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper)
SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper)
-SYSCALL(sys_newfstatat,sys_newfstatat,compat_sys_newfstatat_wrapper)
+SYSCALL(sys_fstatat64,sys_newfstatat,sys32_fstatat_wrapper)
SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper)
SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */
SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper)