From patchwork Mon Jun 20 14:50:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9187735 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 B55036075E for ; Mon, 20 Jun 2016 15:05:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A41AE22B27 for ; Mon, 20 Jun 2016 15:05:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98E69267F1; Mon, 20 Jun 2016 15:05:25 +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 53D7A22B27 for ; Mon, 20 Jun 2016 15:05:24 +0000 (UTC) Received: from localhost ([::1]:44201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0lP-0005x3-2g for patchwork-qemu-devel@patchwork.kernel.org; Mon, 20 Jun 2016 11:05:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0XE-0007G8-Cl for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:50:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF0XC-0007vq-5C for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:50:44 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:57919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0XB-0007vQ-OJ for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:50:41 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1bF0X9-0001Sz-Sy; Mon, 20 Jun 2016 15:50:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 20 Jun 2016 15:50:37 +0100 Message-Id: <1466434237-19334-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466434237-19334-1-git-send-email-peter.maydell@linaro.org> References: <1466434237-19334-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH 3/3] linux-user: Support F_GETPIPE_SZ and F_SETPIPE_SZ fcntls 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: , Cc: Riku Voipio , Laurent Vivier , patches@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Support the F_GETPIPE_SZ and F_SETPIPE_SZ fcntl operations. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier --- linux-user/strace.c | 7 +++++++ linux-user/syscall.c | 6 ++++++ linux-user/syscall_defs.h | 2 ++ 3 files changed, 15 insertions(+) diff --git a/linux-user/strace.c b/linux-user/strace.c index 4046b81..6ef5d38 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -918,6 +918,13 @@ print_fcntl(const struct syscallname *name, case TARGET_F_GETLEASE: gemu_log("F_GETLEASE"); break; + case TARGET_F_SETPIPE_SZ: + gemu_log("F_SETPIPE_SZ,"); + print_raw_param(TARGET_ABI_FMT_ld, arg2, 1); + break; + case TARGET_F_GETPIPE_SZ: + gemu_log("F_GETPIPE_SZ"); + break; case TARGET_F_DUPFD_CLOEXEC: gemu_log("F_DUPFD_CLOEXEC,"); print_raw_param(TARGET_ABI_FMT_ld, arg2, 1); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8065284..719ca20 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5585,6 +5585,10 @@ static int target_to_host_fcntl_cmd(int cmd) case TARGET_F_SETOWN_EX: return F_SETOWN_EX; #endif + case TARGET_F_SETPIPE_SZ: + return F_SETPIPE_SZ; + case TARGET_F_GETPIPE_SZ: + return F_GETPIPE_SZ; default: return -TARGET_EINVAL; } @@ -5822,6 +5826,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) case TARGET_F_GETSIG: case TARGET_F_SETLEASE: case TARGET_F_GETLEASE: + case TARGET_F_SETPIPE_SZ: + case TARGET_F_GETPIPE_SZ: ret = get_errno(safe_fcntl(fd, host_cmd, arg)); break; diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 6ee9251..420463b 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2166,6 +2166,8 @@ struct target_statfs64 { #define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0) #define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1) #define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6) +#define TARGET_F_SETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 7) +#define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) #if defined(TARGET_ALPHA)