diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-19 08:52:17 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-19 08:52:17 +0000 |
commit | 465c9f0630efbbca3e1279817d8bfb51215d7a2b (patch) | |
tree | 5c4ed3c2014d51ebbd7795f4bacfd6e19523ce53 /linux-user/syscall.c | |
parent | Fix indices in Menelaus save/load. (diff) | |
download | qemu-kvm-465c9f0630efbbca3e1279817d8bfb51215d7a2b.tar.gz qemu-kvm-465c9f0630efbbca3e1279817d8bfb51215d7a2b.tar.bz2 qemu-kvm-465c9f0630efbbca3e1279817d8bfb51215d7a2b.zip |
linux-user: Linux kernel's fchmodat and faccessat have three args (no 4th arg)
In Linux kernel, fchmodat() and faccessat() take tree args.
4th value <int flags> is only processed by libc.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7187 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ffdbb98e8..0bc9902eb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -303,15 +303,15 @@ static int sys_getcwd1(char *buf, size_t size) */ #ifdef TARGET_NR_faccessat -static int sys_faccessat(int dirfd, const char *pathname, int mode, int flags) +static int sys_faccessat(int dirfd, const char *pathname, int mode) { - return (faccessat(dirfd, pathname, mode, flags)); + return (faccessat(dirfd, pathname, mode, 0)); } #endif #ifdef TARGET_NR_fchmodat -static int sys_fchmodat(int dirfd, const char *pathname, mode_t mode, int flags) +static int sys_fchmodat(int dirfd, const char *pathname, mode_t mode) { - return (fchmodat(dirfd, pathname, mode, flags)); + return (fchmodat(dirfd, pathname, mode, 0)); } #endif #if defined(TARGET_NR_fchownat) && defined(USE_UID16) @@ -425,11 +425,10 @@ static int sys_utimensat(int dirfd, const char *pathname, * Try direct syscalls instead */ #if defined(TARGET_NR_faccessat) && defined(__NR_faccessat) -_syscall4(int,sys_faccessat,int,dirfd,const char *,pathname,int,mode,int,flags) +_syscall3(int,sys_faccessat,int,dirfd,const char *,pathname,int,mode) #endif #if defined(TARGET_NR_fchmodat) && defined(__NR_fchmodat) -_syscall4(int,sys_fchmodat,int,dirfd,const char *,pathname, - mode_t,mode,int,flags) +_syscall3(int,sys_fchmodat,int,dirfd,const char *,pathname, mode_t,mode) #endif #if defined(TARGET_NR_fchownat) && defined(__NR_fchownat) && defined(USE_UID16) _syscall5(int,sys_fchownat,int,dirfd,const char *,pathname, @@ -4218,7 +4217,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_faccessat: if (!(p = lock_user_string(arg2))) goto efault; - ret = get_errno(sys_faccessat(arg1, p, arg3, arg4)); + ret = get_errno(sys_faccessat(arg1, p, arg3)); unlock_user(p, arg2, 0); break; #endif @@ -4944,7 +4943,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_fchmodat: if (!(p = lock_user_string(arg2))) goto efault; - ret = get_errno(sys_fchmodat(arg1, p, arg3, arg4)); + ret = get_errno(sys_fchmodat(arg1, p, arg3)); unlock_user(p, arg2, 0); break; #endif |