From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvSlB-0005DO-Bw for qemu-devel@nongnu.org; Sun, 19 Apr 2009 04:52:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvSlA-0005CE-6d for qemu-devel@nongnu.org; Sun, 19 Apr 2009 04:52:20 -0400 Received: from [199.232.76.173] (port=39296 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvSl9-0005C5-UW for qemu-devel@nongnu.org; Sun, 19 Apr 2009 04:52:20 -0400 Received: from savannah.gnu.org ([199.232.41.3]:48104 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LvSl9-00044F-Dz for qemu-devel@nongnu.org; Sun, 19 Apr 2009 04:52:19 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LvSl8-0003FL-DU for qemu-devel@nongnu.org; Sun, 19 Apr 2009 08:52:18 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LvSl8-0003FG-5f for qemu-devel@nongnu.org; Sun, 19 Apr 2009 08:52:18 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 19 Apr 2009 08:52:18 +0000 Subject: [Qemu-devel] [7187] linux-user: Linux kernel's fchmodat and faccessat have three args ( no 4th arg) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7187 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7187 Author: aurel32 Date: 2009-04-19 08:52:17 +0000 (Sun, 19 Apr 2009) Log Message: ----------- 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 is only processed by libc. Signed-off-by: Takashi YOSHII Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/linux-user/syscall.c Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2009-04-19 00:26:31 UTC (rev 7186) +++ trunk/linux-user/syscall.c 2009-04-19 08:52:17 UTC (rev 7187) @@ -303,15 +303,15 @@ */ #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 @@ * 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 @@ 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 @@ 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