From patchwork Wed Jun 8 20:24:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 9165651 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 BD6E660572 for ; Wed, 8 Jun 2016 20:29:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0DD0281F9 for ; Wed, 8 Jun 2016 20:29:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5CBE282ED; Wed, 8 Jun 2016 20:29:42 +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 4A5FF281F9 for ; Wed, 8 Jun 2016 20:29:42 +0000 (UTC) Received: from localhost ([::1]:59353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAk6f-0002WD-E4 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 08 Jun 2016 16:29:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAk25-00075w-DP for qemu-devel@nongnu.org; Wed, 08 Jun 2016 16:24:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAk1z-0003tr-Fh for qemu-devel@nongnu.org; Wed, 08 Jun 2016 16:24:56 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:61985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAk1z-0003tG-5D for qemu-devel@nongnu.org; Wed, 08 Jun 2016 16:24:51 -0400 Received: from Quad.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MZUcf-1asEdg3ADN-00LAww; Wed, 08 Jun 2016 22:24:42 +0200 From: Laurent Vivier To: Riku Voipio Date: Wed, 8 Jun 2016 22:24:29 +0200 Message-Id: <1465417472-11359-3-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465417472-11359-1-git-send-email-laurent@vivier.eu> References: <1465417472-11359-1-git-send-email-laurent@vivier.eu> X-Provags-ID: V03:K0:tj7AtAlYLvOJ64eiBXUc+5AbBftMLBd0+P/YxdkNGH0kICYOrDR KoOp93NBPiskCQWCY30+ZoflLQN/TWhtb8Dms5OUrfybZOGSHTRymRhanm6oXK9UpFCoKxk D6V5VtzFNNWHtJGV+Jb2RGYVbfUw5uABbBvVcCG9BTEqodRyICvbSdkFvy11JHtvvgevJ9d dRLPwQzSw9kQPMYMlqdlw== X-UI-Out-Filterresults: notjunk:1; V01:K0:TyfnWgBzroE=:OMq6TJATcB0BXMYGvK6DFZ HA0zYLXvjgJrO+3SmvCBJal3Ao8EE3RYXrkVglcdSAQuEKjbnj/CZBPfa2b2tpx2ia4qfKE4J TImLMcwZLtSN7Yo/QDGbU8PO7qxctpYXCF3zgnV7ly02qFlifDMZD+p4/p1mJbpf7h60a5pww aCk/W6cPEOLVs5mejhIPFMYTkkWdojAiQ0yBbNfY2MvMG/iH1/owdGq+smCkHXO/AJVMm2Vqh KbuQp61uBeZFyWczZX2fqqWHs02G7iBVT28VvmpCbQ8sjUmpPZooCsz9t1+1wkEig4VhaXq5a LCS4pnMtgcSPiSSwk/rKl9EdX71tatLSjx2jNg/Ih3w63L5NCv2YGoetawAsdHN25KlmI0uvg HfnFU+XHFhHXdocmQNzVnD53faGFxMe6gO1qSKq+vXCGPLjApsCRVG05u3LTr2SlG4QIniqpJ jBEBHwsxjLcoyu5YJ+y8ulqup82iBDkAFd936MbVz20evL4HMeP6dzk6fMoZnuOmYhYTurcqK LMUMsvGhahWwaeKv4Rboqz1JGzUDfKtcfSG2UjA4r/rG3WSMNNet4je8wuAYJ6c9vkZTax2Sh rMmIdHSBHTdzr2/kIB7LDa/aYO17sQSR2qFg3boLrdIXoAZSCmn8rlkLS8Mf4ZTY8GOmkut2N HJGacvqPjh7wjHiwG95KYaPKUoq04+AD26bFO7A4dKJetTL1Zk/KEK7A2b8zknN+Iy4Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PATCH 2/5] linux-user: correct setsockopt() strace. 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: qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Laurent Vivier Parameter of SO_RCVTIMEO and SO_SNDTIMEO is timeval, not int. To test this, you can use : QEMU_STRACE= ping localhost 2>&1 |grep TIMEO 568 setsockopt(3,SOL_SOCKET,SO_SNDTIMEO,{1,0},8) = 0 568 setsockopt(3,SOL_SOCKET,SO_RCVTIMEO,{1,0},8) = 0 Signed-off-by: Laurent Vivier --- linux-user/strace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index a7b24e2..398e56e 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1486,10 +1486,12 @@ print_optint: goto print_optint; case TARGET_SO_RCVTIMEO: gemu_log("SO_RCVTIMEO,"); - goto print_optint; + print_timeval(optval, 0); + break; case TARGET_SO_SNDTIMEO: gemu_log("SO_SNDTIMEO,"); - goto print_optint; + print_timeval(optval, 0); + break; case TARGET_SO_ATTACH_FILTER: { struct target_sock_fprog *fprog;