Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JbIwX-0002tL-QX for qemu-devel@nongnu.org; Mon, 17 Mar 2008 13:16:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JbIwW-0002sN-75 for qemu-devel@nongnu.org; Mon, 17 Mar 2008 13:16:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbIwW-0002sH-2f for qemu-devel@nongnu.org; Mon, 17 Mar 2008 13:16:12 -0400 Received: from [204.133.123.27] (helo=mail.chez-thomas.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JbIwV-0001rv-S7 for qemu-devel@nongnu.org; Mon, 17 Mar 2008 13:16:12 -0400 Message-ID: <47DEA757.6070505@mlbassoc.com> Date: Mon, 17 Mar 2008 11:16:07 -0600 From: Gary Thomas MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090108060807060102080507" Subject: [Qemu-devel] [PATCH] add pread64/pwrite64 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 This is a multi-part message in MIME format. --------------090108060807060102080507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The attached patch adds the pread64() and pwrite64() system calls -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ --------------090108060807060102080507 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Index: linux-user/syscall.c =================================================================== --- linux-user/syscall.c (revision 4117) +++ linux-user/syscall.c (revision 4118) @@ -4880,6 +4880,20 @@ unlock_user(p, arg2, 0); break; #endif +#ifdef TARGET_NR_pread64 + case TARGET_NR_pread64: + if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) + goto efault; + ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5))); + unlock_user(p, arg2, ret); + break; + case TARGET_NR_pwrite64: + if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1))) + goto efault; + ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5))); + unlock_user(p, arg2, 0); + break; +#endif case TARGET_NR_getcwd: if (!(p = lock_user(VERIFY_WRITE, arg1, arg2, 0))) goto efault; --------------090108060807060102080507--