forked from Minki/linux
[PATCH] s390: fstatat64 support
Add fstatat64 support to s390 in order to follow changes with
commit cff2b76009
.
Also fixes compilation for 31 bit.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
bc6d7fdf46
commit
19bf9cbf6b
@ -905,6 +905,26 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta
|
|||||||
return ret;
|
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
|
* Linux/i386 didn't use to be able to handle more than
|
||||||
* 4 system call parameters, so these system calls used a memory
|
* 4 system call parameters, so these system calls used a memory
|
||||||
|
@ -1523,13 +1523,13 @@ compat_sys_futimesat_wrapper:
|
|||||||
llgtr %r4,%r4 # struct timeval *
|
llgtr %r4,%r4 # struct timeval *
|
||||||
jg compat_sys_futimesat
|
jg compat_sys_futimesat
|
||||||
|
|
||||||
.globl compat_sys_newfstatat_wrapper
|
.globl sys32_fstatat_wrapper
|
||||||
compat_sys_newfstatat_wrapper:
|
sys32_fstatat_wrapper:
|
||||||
llgfr %r2,%r2 # unsigned int
|
llgfr %r2,%r2 # unsigned int
|
||||||
llgtr %r3,%r3 # char *
|
llgtr %r3,%r3 # char *
|
||||||
llgtr %r4,%r4 # struct stat *
|
llgtr %r4,%r4 # struct stat64 *
|
||||||
lgfr %r5,%r5 # int
|
lgfr %r5,%r5 # int
|
||||||
jg compat_sys_newfstatat
|
jg sys32_fstatat
|
||||||
|
|
||||||
.globl sys_unlinkat_wrapper
|
.globl sys_unlinkat_wrapper
|
||||||
sys_unlinkat_wrapper:
|
sys_unlinkat_wrapper:
|
||||||
|
@ -301,7 +301,7 @@ SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper)
|
|||||||
SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */
|
SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */
|
||||||
SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper)
|
SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper)
|
||||||
SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_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_unlinkat,sys_unlinkat,sys_unlinkat_wrapper)
|
||||||
SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */
|
SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */
|
||||||
SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper)
|
SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper)
|
||||||
|
@ -285,7 +285,7 @@
|
|||||||
#define __NR_mknodat 290
|
#define __NR_mknodat 290
|
||||||
#define __NR_fchownat 291
|
#define __NR_fchownat 291
|
||||||
#define __NR_futimesat 292
|
#define __NR_futimesat 292
|
||||||
#define __NR_newfstatat 293
|
#define __NR_fstatat64 293
|
||||||
#define __NR_unlinkat 294
|
#define __NR_unlinkat 294
|
||||||
#define __NR_renameat 295
|
#define __NR_renameat 295
|
||||||
#define __NR_linkat 296
|
#define __NR_linkat 296
|
||||||
@ -359,6 +359,7 @@
|
|||||||
#undef __NR_fcntl64
|
#undef __NR_fcntl64
|
||||||
#undef __NR_sendfile64
|
#undef __NR_sendfile64
|
||||||
#undef __NR_fadvise64_64
|
#undef __NR_fadvise64_64
|
||||||
|
#undef __NR_fstatat64
|
||||||
|
|
||||||
#define __NR_select 142
|
#define __NR_select 142
|
||||||
#define __NR_getrlimit 191 /* SuS compliant getrlimit */
|
#define __NR_getrlimit 191 /* SuS compliant getrlimit */
|
||||||
@ -381,6 +382,7 @@
|
|||||||
#define __NR_setgid 214
|
#define __NR_setgid 214
|
||||||
#define __NR_setfsuid 215
|
#define __NR_setfsuid 215
|
||||||
#define __NR_setfsgid 216
|
#define __NR_setfsgid 216
|
||||||
|
#define __NR_newfstatat 293
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user