From 19bf9cbf6b313ae79a0c7278ccaa9c72c86931bd Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Sun, 12 Feb 2006 12:35:03 +0100 Subject: [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 Signed-off-by: Linus Torvalds --- arch/s390/kernel/compat_linux.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'arch/s390/kernel/compat_linux.c') 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 -- cgit v1.2.3