From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Laurent Vivier Date: Wed, 8 Jun 2016 22:24:29 +0200 Message-Id: <1465417472-11359-3-git-send-email-laurent@vivier.eu> In-Reply-To: <1465417472-11359-1-git-send-email-laurent@vivier.eu> References: <1465417472-11359-1-git-send-email-laurent@vivier.eu> Subject: [Qemu-devel] [PATCH 2/5] linux-user: correct setsockopt() strace. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: qemu-devel@nongnu.org, Laurent Vivier , Laurent Vivier 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; -- 2.5.5