Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgsvJ-000374-09 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:14:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgsvI-00036s-HQ for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:14:16 -0400 Received: from [199.232.76.173] (port=44300 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgsvI-00036n-Az for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:14:16 -0400 Received: from savannah.gnu.org ([199.232.41.3]:41639 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 1KgsvH-0001iJ-U2 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:14:16 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KgsvH-0001J2-FC for qemu-devel@nongnu.org; Sat, 20 Sep 2008 03:14:15 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KgsvH-0001Iy-3l for qemu-devel@nongnu.org; Sat, 20 Sep 2008 03:14:15 +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 03:14:15 +0000 Subject: [Qemu-devel] [5272] Fix pread() and pwrite() syscall on ARM EABI (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: 5272 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5272 Author: balrog Date: 2008-09-20 03:14:14 +0000 (Sat, 20 Sep 2008) Log Message: ----------- Fix pread() and pwrite() syscall on ARM EABI (Kirill Shutemov). pread() and pwrite() have differences in arguments between ARM EABI and OABI. See arch/arm/kernel/entry-common.S in Linux kernel source for additional information. 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 03:03:09 UTC (rev 5271) +++ trunk/linux-user/syscall.c 2008-09-20 03:14:14 UTC (rev 5272) @@ -5139,12 +5139,20 @@ #endif #ifdef TARGET_NR_pread case TARGET_NR_pread: +#ifdef TARGET_ARM + if (((CPUARMState *)cpu_env)->eabi) + arg4 = arg5; +#endif if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) goto efault; ret = get_errno(pread(arg1, p, arg3, arg4)); unlock_user(p, arg2, ret); break; case TARGET_NR_pwrite: +#ifdef TARGET_ARM + if (((CPUARMState *)cpu_env)->eabi) + arg4 = arg5; +#endif if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1))) goto efault; ret = get_errno(pwrite(arg1, p, arg3, arg4));