From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgsAI-0003l6-9H for qemu-devel@nongnu.org; Fri, 19 Sep 2008 22:25:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgsAH-0003kq-8J for qemu-devel@nongnu.org; Fri, 19 Sep 2008 22:25:41 -0400 Received: from [199.232.76.173] (port=33900 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgsAH-0003kn-4d for qemu-devel@nongnu.org; Fri, 19 Sep 2008 22:25:41 -0400 Received: from savannah.gnu.org ([199.232.41.3]:43514 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 1KgsAH-00011v-9r for qemu-devel@nongnu.org; Fri, 19 Sep 2008 22:25:41 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KgsAG-0000F2-7n for qemu-devel@nongnu.org; Sat, 20 Sep 2008 02:25:40 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KgsAF-0000Ey-Td for qemu-devel@nongnu.org; Sat, 20 Sep 2008 02:25:40 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Sat, 20 Sep 2008 02:25:39 +0000 Subject: [Qemu-devel] [5269] Implement the futimesat() syscall (by Kirill Shutemov). 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: 5269 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5269 Author: balrog Date: 2008-09-20 02:25:39 +0000 (Sat, 20 Sep 2008) Log Message: ----------- Implement the futimesat() syscall (by Kirill Shutemov). Signed-off-by: Kirill A. Shutemov Modified Paths: -------------- trunk/linux-user/syscall.c Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2008-09-20 02:23:36 UTC (rev 5268) +++ trunk/linux-user/syscall.c 2008-09-20 02:25:39 UTC (rev 5269) @@ -157,6 +157,7 @@ #define __NR_sys_fchmodat __NR_fchmodat #define __NR_sys_fchownat __NR_fchownat #define __NR_sys_fstatat64 __NR_fstatat64 +#define __NR_sys_futimesat __NR_futimesat #define __NR_sys_getcwd1 __NR_getcwd #define __NR_sys_getdents __NR_getdents #define __NR_sys_getdents64 __NR_getdents64 @@ -205,6 +206,10 @@ _syscall4(int,sys_fstatat64,int,dirfd,const char *,pathname, struct stat *,buf,int,flags) #endif +#if defined(TARGET_NR_futimesat) && defined(__NR_futimesat) +_syscall3(int,sys_futimesat,int,dirfd,const char *,pathname, + const struct timeval *,times) +#endif _syscall2(int,sys_getcwd1,char *,buf,size_t,size) #if TARGET_ABI_BITS == 32 _syscall3(int, sys_getdents, uint, fd, struct dirent *, dirp, uint, count); @@ -3662,6 +3667,26 @@ unlock_user(p, arg1, 0); } break; +#if defined(TARGET_NR_futimesat) && defined(__NR_futimesat) + case TARGET_NR_futimesat: + { + struct timeval *tvp, tv[2]; + if (arg3) { + if (copy_from_user_timeval(&tv[0], arg3) + || copy_from_user_timeval(&tv[1], + arg3 + sizeof(struct target_timeval))) + goto efault; + tvp = tv; + } else { + tvp = NULL; + } + if (!(p = lock_user_string(arg2))) + goto efault; + ret = get_errno(sys_futimesat(arg1, path(p), tvp)); + unlock_user(p, arg2, 0); + } + break; +#endif #ifdef TARGET_NR_stty case TARGET_NR_stty: goto unimplemented;