From patchwork Mon Sep 5 14:03:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 9314085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1244060760 for ; Mon, 5 Sep 2016 14:19:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0191128AC5 for ; Mon, 5 Sep 2016 14:19:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E94BA28ACA; Mon, 5 Sep 2016 14:19:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8FB0128AC5 for ; Mon, 5 Sep 2016 14:19:30 +0000 (UTC) Received: from localhost ([::1]:54923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgukD-0005BX-Oh for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Sep 2016 10:19:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bguVp-00017G-ET for qemu-devel@nongnu.org; Mon, 05 Sep 2016 10:04:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bguVi-0005p9-5m for qemu-devel@nongnu.org; Mon, 05 Sep 2016 10:04:36 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:37581 helo=mail.rt-rk.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bguVh-0005p4-UV for qemu-devel@nongnu.org; Mon, 05 Sep 2016 10:04:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 250C41A4539; Mon, 5 Sep 2016 16:04:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from mcs19.ba.imgtec.org (unknown [82.117.201.26]) by mail.rt-rk.com (Postfix) with ESMTPSA id 00CF31A1D91; Mon, 5 Sep 2016 16:04:28 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org, riku.voipio@iki.fi, peter.maydell@linaro.org, petar.jovanovic@imgtec.com, miodrag.dinic@imgtec.com, aleksandar.markovic@imgtec.com Date: Mon, 5 Sep 2016 16:03:53 +0200 Message-Id: <1473084236-35564-6-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1473084236-35564-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1473084236-35564-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v2 5/5] linux-user: Insert missing #ifdefs for some syscalls X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Aleksandar Markovic Not all syscall-specific code segments in main switch statement in do_syscall() are inclosed in appropriate "#ifdefs". This patch fixes some of these cases. Signed-off-by: Aleksandar Markovic --- linux-user/syscall.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b5d8507..ba1d522 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9139,6 +9139,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } break; #endif +#ifdef TARGET_NR_setitimer case TARGET_NR_setitimer: { struct itimerval value, ovalue, *pvalue; @@ -9162,6 +9163,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } } break; +#endif +#ifdef TARGET_NR_getitimer case TARGET_NR_getitimer: { struct itimerval value; @@ -9176,6 +9179,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } } break; +#endif #ifdef TARGET_NR_stat case TARGET_NR_stat: if (!(p = lock_user_string(arg1))) @@ -9242,6 +9246,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, arg6, arg7, arg8, 0); break; #endif +#ifdef TARGET_NR_wait4 case TARGET_NR_wait4: { int status; @@ -9269,6 +9274,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } } break; +#endif #ifdef TARGET_NR_swapoff case TARGET_NR_swapoff: if (!(p = lock_user_string(arg1))) @@ -9277,6 +9283,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, unlock_user(p, arg1, 0); break; #endif +#ifdef TARGET_NR_sysinfo case TARGET_NR_sysinfo: { struct target_sysinfo *target_value; @@ -9304,6 +9311,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } } break; +#endif #ifdef TARGET_NR_ipc case TARGET_NR_ipc: ret = do_ipc(arg1, arg2, arg3, arg4, arg5, arg6); @@ -9364,9 +9372,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = do_shmdt(arg1); break; #endif +#ifdef TARGET_NR_fsync case TARGET_NR_fsync: ret = get_errno(fsync(arg1)); break; +#endif +#ifdef TARGET_NR_clone case TARGET_NR_clone: /* Linux manages to have three different orderings for its * arguments to clone(); the BACKWARDS and BACKWARDS2 defines @@ -9384,6 +9395,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4)); #endif break; +#endif #ifdef __NR_exit_group /* new thread calls */ case TARGET_NR_exit_group: