From: Laurent Vivier <laurent@vivier.eu>
To: Riku Voipio <riku.voipio@iki.fi>
Cc: qemu-devel@nongnu.org, Laurent Vivier <Laurent@Vivier.EU>,
Laurent Vivier <laurent@vivier.eu>
Subject: [Qemu-devel] [PATCH 2/5] linux-user: correct setsockopt() strace.
Date: Wed, 8 Jun 2016 22:24:29 +0200 [thread overview]
Message-ID: <1465417472-11359-3-git-send-email-laurent@vivier.eu> (raw)
In-Reply-To: <1465417472-11359-1-git-send-email-laurent@vivier.eu>
From: Laurent Vivier <Laurent@Vivier.EU>
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 <laurent@vivier.eu>
---
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
next prev parent reply other threads:[~2016-06-08 20:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 20:24 [Qemu-devel] [PATCH 0/5] linux-user: some strace improvements Laurent Vivier
2016-06-08 20:24 ` [Qemu-devel] [PATCH 1/5] linux-user: add socketcall() strace Laurent Vivier
2016-06-10 12:51 ` Peter Maydell
2016-06-08 20:24 ` Laurent Vivier [this message]
2016-06-10 12:53 ` [Qemu-devel] [PATCH 2/5] linux-user: correct setsockopt() strace Peter Maydell
2016-06-08 20:24 ` [Qemu-devel] [PATCH 3/5] linux-user: add socket() strace Laurent Vivier
2016-06-10 12:54 ` Peter Maydell
2016-06-08 20:24 ` [Qemu-devel] [PATCH 4/5] linux-user: fix clone() strace Laurent Vivier
2016-06-10 13:13 ` Peter Maydell
2016-06-08 20:24 ` [Qemu-devel] [PATCH 5/5] linux-user: update get_thread_area/set_thread_area strace Laurent Vivier
2016-06-10 13:04 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465417472-11359-3-git-send-email-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).