From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpKMl-0003qf-EQ for qemu-devel@nongnu.org; Mon, 13 Oct 2008 06:09:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpKMh-0003oF-VN for qemu-devel@nongnu.org; Mon, 13 Oct 2008 06:09:30 -0400 Received: from [199.232.76.173] (port=47843 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpKMh-0003o4-PC for qemu-devel@nongnu.org; Mon, 13 Oct 2008 06:09:27 -0400 Received: from ug-out-1314.google.com ([66.249.92.169]:63550) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KpKMh-00076x-9F for qemu-devel@nongnu.org; Mon, 13 Oct 2008 06:09:27 -0400 Received: by ug-out-1314.google.com with SMTP id j3so435909ugf.36 for ; Mon, 13 Oct 2008 03:09:23 -0700 (PDT) From: "Kirill A. Shutemov" Date: Mon, 13 Oct 2008 13:10:28 +0300 Message-Id: <1223892640-15545-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" , Paul Brook 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