From patchwork Wed Oct 28 19:13:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 537547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7A0F21402B9 for ; Thu, 29 Oct 2015 06:15:25 +1100 (AEDT) Received: from localhost ([::1]:40287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWBv-0007KA-Kt for incoming@patchwork.ozlabs.org; Wed, 28 Oct 2015 15:15:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrW9w-000490-Bj for qemu-devel@nongnu.org; Wed, 28 Oct 2015 15:13:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrW9s-0005nV-H8 for qemu-devel@nongnu.org; Wed, 28 Oct 2015 15:13:20 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:6171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrW9s-0005mY-Bc for qemu-devel@nongnu.org; Wed, 28 Oct 2015 15:13:16 -0400 Received: from Quad.localdomain (unknown [78.238.229.36]) by smtp4-g21.free.fr (Postfix) with ESMTPS id E34224C80B1; Wed, 28 Oct 2015 20:13:14 +0100 (CET) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 28 Oct 2015 20:13:01 +0100 Message-Id: <1446059583-16340-3-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1446059583-16340-1-git-send-email-laurent@vivier.eu> References: <1446059583-16340-1-git-send-email-laurent@vivier.eu> X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 212.27.42.4 Cc: peter.maydell@linaro.org, riku.voipio@iki.fi, Laurent Vivier Subject: [Qemu-devel] [PATCH v2 2/4] linux-user: rename TargetFdFunc to TargetFdDataFunc, and structure fields accordingly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell --- linux-user/syscall.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7c724ab..41b85b4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -295,20 +295,20 @@ static bitmask_transtbl fcntl_flags_tbl[] = { { 0, 0, 0, 0 } }; -typedef abi_long (*TargetFdFunc)(void *, size_t); +typedef abi_long (*TargetFdDataFunc)(void *, size_t); typedef struct TargetFdTrans { - TargetFdFunc host_to_target; - TargetFdFunc target_to_host; + TargetFdDataFunc host_to_target_data; + TargetFdDataFunc target_to_host_data; } TargetFdTrans; static TargetFdTrans **target_fd_trans; static unsigned int target_fd_max; -static TargetFdFunc fd_trans_host_to_target(int fd) +static TargetFdDataFunc fd_trans_host_to_target_data(int fd) { if (fd < target_fd_max && target_fd_trans[fd]) { - return target_fd_trans[fd]->host_to_target; + return target_fd_trans[fd]->host_to_target_data; } return NULL; } @@ -5438,7 +5438,7 @@ host_to_target_signalfd_siginfo(struct signalfd_siginfo *tinfo, tinfo->ssi_addr = tswap64(info->ssi_addr); } -static abi_long host_to_target_signalfd(void *buf, size_t len) +static abi_long host_to_target_data_signalfd(void *buf, size_t len) { int i; @@ -5450,7 +5450,7 @@ static abi_long host_to_target_signalfd(void *buf, size_t len) } static TargetFdTrans target_signalfd_trans = { - .host_to_target = host_to_target_signalfd, + .host_to_target_data = host_to_target_data_signalfd, }; static abi_long do_signalfd4(int fd, abi_long mask, int flags) @@ -5867,8 +5867,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, goto efault; ret = get_errno(read(arg1, p, arg3)); if (ret >= 0 && - fd_trans_host_to_target(arg1)) { - ret = fd_trans_host_to_target(arg1)(p, ret); + fd_trans_host_to_target_data(arg1)) { + ret = fd_trans_host_to_target_data(arg1)(p, ret); } unlock_user(p, arg2, ret); }