From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KggOP-0007EX-2y for qemu-devel@nongnu.org; Fri, 19 Sep 2008 09:51:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KggON-0007By-5w for qemu-devel@nongnu.org; Fri, 19 Sep 2008 09:51:28 -0400 Received: from [199.232.76.173] (port=50899 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KggON-0007Br-2a for qemu-devel@nongnu.org; Fri, 19 Sep 2008 09:51:27 -0400 Received: from nf-out-0910.google.com ([64.233.182.190]:33551) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KggON-0007YL-79 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 09:51:27 -0400 Received: by nf-out-0910.google.com with SMTP id b2so225056nfb.12 for ; Fri, 19 Sep 2008 06:51:26 -0700 (PDT) From: "Kirill A. Shutemov" Date: Fri, 19 Sep 2008 16:52:11 +0300 Message-Id: <1221832331-22637-1-git-send-email-kirill@shutemov.name> In-Reply-To: <20080919133313.GA19874@kos.to> References: <20080919133313.GA19874@kos.to> Subject: [Qemu-devel] [PATCH] Add fadvise64 stubs 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" , Riku Voipio Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS. Signed-off-by: Riku Voipio Signed-off-by: Kirill A. Shutemov --- linux-user/syscall.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 56b4138..74e4998 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5509,6 +5509,25 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_mincore: goto unimplemented; #endif +#ifdef TARGET_NR_arm_fadvise64_64 + case TARGET_NR_arm_fadvise64_64: + { + /* + * arm_fadvise64_64 looks like fadvise64_64 but + * with different argument order + */ + abi_long temp; + temp = arg3; + arg3 = arg4; + arg4 = temp; + } +#endif +#ifdef TARGET_NR_fadvise64_64 + case TARGET_NR_fadvise64_64: + /* This is a hint, so ignoring and returning success is ok. */ + ret = get_errno(0); + break; +#endif #ifdef TARGET_NR_madvise case TARGET_NR_madvise: /* A straight passthrough may not be safe because qemu sometimes -- 1.5.6.5.GIT