From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl2As-0000ui-1J for qemu-devel@nongnu.org; Wed, 01 Oct 2008 09:55:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl2An-0000ry-Po for qemu-devel@nongnu.org; Wed, 01 Oct 2008 09:55:28 -0400 Received: from [199.232.76.173] (port=54456 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl2An-0000ro-M7 for qemu-devel@nongnu.org; Wed, 01 Oct 2008 09:55:25 -0400 Received: from nf-out-0910.google.com ([64.233.182.187]:1868) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kl2An-0002tk-7c for qemu-devel@nongnu.org; Wed, 01 Oct 2008 09:55:25 -0400 Received: by nf-out-0910.google.com with SMTP id b2so244492nfb.12 for ; Wed, 01 Oct 2008 06:55:24 -0700 (PDT) From: "Kirill A. Shutemov" Date: Wed, 1 Oct 2008 16:56:14 +0300 Message-Id: <1222869382-586-3-git-send-email-kirill@shutemov.name> In-Reply-To: <1222869382-586-2-git-send-email-kirill@shutemov.name> References: <1222869382-586-1-git-send-email-kirill@shutemov.name> <1222869382-586-2-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 10af2e5..e01b4d4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5749,7 +5749,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