From patchwork Tue Jun 28 19:12:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 641720 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 3rfGCr3ym3z9s5w for ; Wed, 29 Jun 2016 05:32:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=GrFAz+Qz; dkim-atps=neutral Received: from localhost ([::1]:39082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHykA-0008E1-66 for incoming@patchwork.ozlabs.org; Tue, 28 Jun 2016 15:32:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHyRi-0001yr-TH for qemu-devel@nongnu.org; Tue, 28 Jun 2016 15:13:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHyRg-0006tB-Rl for qemu-devel@nongnu.org; Tue, 28 Jun 2016 15:13:17 -0400 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:36756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHyRg-0006sx-Jq for qemu-devel@nongnu.org; Tue, 28 Jun 2016 15:13:16 -0400 Received: by mail-lf0-x232.google.com with SMTP id q132so18130077lfe.3 for ; Tue, 28 Jun 2016 12:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Tb6E/74soFWdL/F0qzNdBYmT6QEhsLf0AWwHdFsMZBI=; b=GrFAz+QzEEw2nRVohPL81on0yzxRnqc1p5e1ORG9q4s39DlAMC9ninKfFfoOS0nxVu MCWTgT1HV3ArNfozoMLya+lVmx3Bm7hzKchkM7hn6bfWYCn7hxm1bUJLzbNuM2RtStEi zhcN5LuNWIY4IwzApd/p/C4dC2XF5RdxvuBQE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Tb6E/74soFWdL/F0qzNdBYmT6QEhsLf0AWwHdFsMZBI=; b=nMhhcKxqcAyDIMWwb7zgF8UDvH/BOs1PVmJ2CYIZZc5w0RgpdGLPCeI9DBCTR5tBqG csc3gxcPNClX+5i1rC+IyPAoJPWRxLTX7dglvuY9NgbWF2q+O3oCCDitA5dAbDRWMVqY DBHUZ7TNaCW53A0eoEMI1Krzwku/sjoFzR2A/odtCrmMpTGGPX9ExGBVltZ8U8MtBiBZ QrNviYmYPkYmB5ksSgNz9qjv2jHYdZl7kgnWdAT/+V6tnHxZM7m9UPYMTqJ5WFcgQyFb qKRL+GLjfsdLMYefcrPDFodePgJRPk/bFrBtHLq4Dim8HHSOQw2F8crqrkLj+ut9NkGb dXLw== X-Gm-Message-State: ALyK8tKWhI6tC1aXzvEA9ozkm/wePAX8LEKErNI0TJUzT/hz5AE66yljBsLBUsxzoaO/Kd5W X-Received: by 10.25.169.7 with SMTP id s7mr1850083lfe.57.1467141195982; Tue, 28 Jun 2016 12:13:15 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id h10sm4262823ljh.38.2016.06.28.12.13.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 12:13:14 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 28 Jun 2016 22:12:45 +0300 Message-Id: <7e3b92ece0fff8073772b0e8a7bda41254626b78.1467138806.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::232 Subject: [Qemu-devel] [PULL v2 11/24] 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: Peter Maydell Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Support the F_GETPIPE_SZ and F_SETPIPE_SZ fcntl operations. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- 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 8163ae8..b8a0738 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)