From patchwork Mon Jun 23 13:26:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32359 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5FA8320540 for ; Mon, 23 Jun 2014 13:32:00 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id il7sf22501844vcb.8 for ; Mon, 23 Jun 2014 06:32:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=gYGmC7Wf2onPcQb4nIjBiWYgA4ENyOejN7YhVuKD6rE=; b=mfGhZGk2/Tfrz7dPs/xCIZ8ul/iTbvWCDWZAqGhUsahMTj9WMfAET7cFdORLq9FuNy GWMbV+cPc3zGLevESHB8+xzE2jXfuOx2rmgOOnqhTfWsUyVfW5zisvcVlqdFLa7cYGXj SHv55xMCJPIHxSsr8YqiMSFX1NZ62LKGsIYHjMR53CsylSG9Udt/A+Uzkogw1SNrA7BS DYnAFtbjAWoc9ToNm2mh/9zXdFP+3PpMFS8oBRqrLPFkl0eThpGkK6jE+vHyD2beNFeV FmwC1jCJtonOoi8yhcel4Cv5xDpkpHNy45BlGa3Tz1z1TuR2HVvLm8XTmPrELvzyN9YO ZURA== X-Gm-Message-State: ALoCoQn7uRnpX6XOWS5S8rry8Rg/9/zQ6YiKRsGzBZSCogNjSeQMyaEf4ChGNRkEasOwz7PDlpjY X-Received: by 10.58.32.35 with SMTP id f3mr9622567vei.1.1403530320120; Mon, 23 Jun 2014 06:32:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.33.202 with SMTP id j68ls1893325qgj.28.gmail; Mon, 23 Jun 2014 06:32:00 -0700 (PDT) X-Received: by 10.58.155.38 with SMTP id vt6mr7614692veb.3.1403530320041; Mon, 23 Jun 2014 06:32:00 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id cx7si8988748vcb.57.2014.06.23.06.32.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Jun 2014 06:32:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id im17so5994575vcb.11 for ; Mon, 23 Jun 2014 06:32:00 -0700 (PDT) X-Received: by 10.52.52.168 with SMTP id u8mr16246006vdo.25.1403530319973; Mon, 23 Jun 2014 06:31:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp130936vcb; Mon, 23 Jun 2014 06:31:59 -0700 (PDT) X-Received: by 10.224.160.83 with SMTP id m19mr21695059qax.32.1403530319568; Mon, 23 Jun 2014 06:31:59 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u18si22683788qga.5.2014.06.23.06.31.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Jun 2014 06:31:59 -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; Received: from localhost ([::1]:53536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Ln-0001Tg-4x for patch@linaro.org; Mon, 23 Jun 2014 09:31:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Gn-0003iT-Jh for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz4Gd-0001BW-Ku for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:49 -0400 Received: from afflict.kos.to ([92.243.29.197]:50456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Gd-0001Aa-Cp for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:39 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 294EB26560; Mon, 23 Jun 2014 15:26:36 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 23 Jun 2014 16:26:21 +0300 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: Paul Burton Subject: [Qemu-devel] [PULL 06/19] linux-user: support SO_{SND, RCV}BUFFORCE setsockopt options 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Paul Burton Translate the SO_SNDBUFFORCE & SO_RCVBUFFORCE options to setsockopt to the host values & perform the syscall as expected, allowing use of those options by target programs. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b1e57df..bdc60fe 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1502,9 +1502,15 @@ set_timeout: case TARGET_SO_SNDBUF: optname = SO_SNDBUF; break; + case TARGET_SO_SNDBUFFORCE: + optname = SO_SNDBUFFORCE; + break; case TARGET_SO_RCVBUF: optname = SO_RCVBUF; break; + case TARGET_SO_RCVBUFFORCE: + optname = SO_RCVBUFFORCE; + break; case TARGET_SO_KEEPALIVE: optname = SO_KEEPALIVE; break;