From patchwork Fri Jun 24 09:53:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 70807 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp861218qgy; Fri, 24 Jun 2016 03:00:02 -0700 (PDT) X-Received: by 10.55.217.152 with SMTP id q24mr3419002qkl.159.1466762402259; Fri, 24 Jun 2016 03:00:02 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p133si4338534qka.32.2016.06.24.03.00.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 24 Jun 2016 03:00:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNu5-000819-PA for patch@linaro.org; Fri, 24 Jun 2016 06:00:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNnw-0000mJ-Ut for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGNnu-0003Nm-Uy for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:39 -0400 Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:35413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNnu-0003NZ-Mq for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:38 -0400 Received: by mail-lf0-x22b.google.com with SMTP id l188so111652953lfe.2 for ; Fri, 24 Jun 2016 02:53:38 -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=+Hy4a3dJgeF+bdDGF/ptwp+d8yq72m60OZvRkwaXfhU=; b=XSTaP5uDIjN4riLsHiBM3mTZdM70zhg2JQYP4ZZo0essXGQehzRVeMPHQZXMnSz5JP U7q0OtZiRNJTq1By7G+wNbLodph/7KVm2q4cWgwY72+o8QjfBw3o6or6lMZU4wFas7ax nWoTaXA6v3OktkXcsEsucLH8FPw00fUX9ZOjo= 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=+Hy4a3dJgeF+bdDGF/ptwp+d8yq72m60OZvRkwaXfhU=; b=Pi+m7xs+p2LvP5tcKa92MB2TrKoHbwILCUElAenBZghAY/F6HiJgW+ChVD+GcPWp9J cqP646XXkKS1sZaN6Z+gDKXFwlVHPIDdP2tYZ3fvNCblWKnhcsYi5yU47C3wB8GpybkG 7hvDHIUx59fQZjSMM2U/r1ixa9xRdtnzRF5O6KRwy2lJ/5bwy2qyNb4SxBIYqgZ9wsbm /F1XMdXruzapXKNPN+VT+/xBhErGCo5tslk1mCtOUPJNgLV48Ah3QXyuY6i2HloKzAXJ T0kEvv8S4Fu0b+VX1vnJdonfTx6rCzJP4u2/Egzh0tuglB5GD0CgFvhZwLulQkdyx/es tufw== X-Gm-Message-State: ALyK8tIgG+oovPtvLtRqhVUMfUTJpHNLHkCYw+Zq5m7GyTdnSfDE0PmEq8Sby3CZkUze/izE X-Received: by 10.25.4.202 with SMTP id 193mr1087619lfe.204.1466762017929; Fri, 24 Jun 2016 02:53:37 -0700 (PDT) Received: from beaming.home (85-76-80-69-nat.elisa-mobile.fi. [85.76.80.69]) by smtp.gmail.com with ESMTPSA id o137sm798203lfe.2.2016.06.24.02.53.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 02:53:37 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 24 Jun 2016 12:53:06 +0300 Message-Id: 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::22b Subject: [Qemu-devel] [PULL 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+patch=linaro.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(+) -- 2.1.4 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 686ebfb..b1ed57c 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)