From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KneA6-00047p-6g for qemu-devel@nongnu.org; Wed, 08 Oct 2008 14:53:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KneA4-00046r-KL for qemu-devel@nongnu.org; Wed, 08 Oct 2008 14:53:29 -0400 Received: from [199.232.76.173] (port=54463 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KneA4-00046o-Eb for qemu-devel@nongnu.org; Wed, 08 Oct 2008 14:53:28 -0400 Received: from ik-out-1112.google.com ([66.249.90.181]:43770) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KneA4-0006qx-2b for qemu-devel@nongnu.org; Wed, 08 Oct 2008 14:53:28 -0400 Received: by ik-out-1112.google.com with SMTP id c21so2718980ika.2 for ; Wed, 08 Oct 2008 11:53:26 -0700 (PDT) From: "Kirill A. Shutemov" Date: Wed, 8 Oct 2008 21:54:25 +0300 Message-Id: <1223492074-5677-1-git-send-email-kirill@shutemov.name> Subject: [Qemu-devel] [PATCH] Add readahead syscall 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 Cc: "Kirill A. Shutemov" Signed-off-by: Kirill A. Shutemov --- linux-user/syscall.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f1f050e..dc7e561 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5761,7 +5761,20 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #ifdef TARGET_NR_readahead case TARGET_NR_readahead: - goto unimplemented; +#if TARGET_ABI_BITS == 32 +#ifdef TARGET_ARM + if (((CPUARMState *)cpu_env)->eabi) + { + arg2 = arg3; + arg3 = arg4; + arg4 = arg5; + } +#endif + ret = get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, arg4)); +#else + ret = get_errno(readahead(arg1, arg2, arg3)); +#endif + break; #endif #ifdef TARGET_NR_setxattr case TARGET_NR_setxattr: -- 1.5.6.5.GIT