qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Laurent Vivier <laurent@vivier.eu>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org, "Riku Voipio" <riku.voipio@iki.fi>,
	"Guido Günther" <agx@sigxcpu.org>
Subject: [Qemu-devel] [PATCH v5 04/10] linux-user/strace: Improve settimeofday()
Date: Thu, 11 Oct 2018 00:36:50 +0200	[thread overview]
Message-ID: <20181010223656.31632-5-f4bug@amsat.org> (raw)
In-Reply-To: <20181010223656.31632-1-f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-By: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/strace.c    | 13 +++++++++++++
 linux-user/strace.list |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 10ae22263c..ca2cd75993 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1502,6 +1502,19 @@ print_futimesat(const struct syscallname *name,
 }
 #endif
 
+#ifdef TARGET_NR_settimeofday
+static void
+print_settimeofday(const struct syscallname *name,
+                abi_long arg0, abi_long arg1, abi_long arg2,
+                abi_long arg3, abi_long arg4, abi_long arg5)
+{
+    print_syscall_prologue(name);
+    print_timeval(arg0, 0);
+    print_timezone(arg1, 1);
+    print_syscall_epilogue(name);
+}
+#endif
+
 #ifdef TARGET_NR_link
 static void
 print_link(const struct syscallname *name,
diff --git a/linux-user/strace.list b/linux-user/strace.list
index ff8bb19f5f..31093c3371 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -1345,7 +1345,7 @@
 { TARGET_NR_set_tid_address, "set_tid_address" , NULL, NULL, NULL },
 #endif
 #ifdef TARGET_NR_settimeofday
-{ TARGET_NR_settimeofday, "settimeofday" , NULL, NULL, NULL },
+{ TARGET_NR_settimeofday, "settimeofday" , NULL, print_settimeofday, NULL },
 #endif
 #ifdef TARGET_NR_setuid
 { TARGET_NR_setuid, "setuid" , NULL, NULL, NULL },
-- 
2.19.1

  parent reply	other threads:[~2018-10-10 22:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 22:36 [Qemu-devel] [PATCH v5 00/10] linux-user: strace improvements Philippe Mathieu-Daudé
2018-10-10 22:36 ` [Qemu-devel] [PATCH v5 01/10] linux-user/syscall: Verify recvfrom(addr) is user-writable Philippe Mathieu-Daudé
2018-10-14 13:19   ` Laurent Vivier
2018-10-10 22:36 ` [Qemu-devel] [PATCH v5 02/10] linux-user/strace: Display invalid pointer in print_timeval() Philippe Mathieu-Daudé
2018-10-10 22:36 ` [Qemu-devel] [PATCH v5 03/10] linux-user/strace: Add print_timezone() Philippe Mathieu-Daudé
2018-10-10 22:36 ` Philippe Mathieu-Daudé [this message]
2018-10-10 22:36 ` [Qemu-devel] [PATCH v5 05/10] linux-user/syscall: Introduce target_sockaddr_nl Philippe Mathieu-Daudé
2018-10-10 22:36 ` [Qemu-devel] [PATCH v5 06/10] linux-user/strace: Dump AF_NETLINK sockaddr content Philippe Mathieu-Daudé
2018-10-10 22:36 ` [Qemu-devel] [PATCH v5 07/10] linux-user/strace: Add print_sockfd() Philippe Mathieu-Daudé
2018-10-10 22:36 ` [Qemu-devel] [PATCH v5 08/10] linux-user/strace: Let print_sockaddr() have a 'last' argument Philippe Mathieu-Daudé
     [not found] ` <20181010223656.31632-10-f4bug@amsat.org>
2018-10-13 18:27   ` [Qemu-devel] [PATCH v5 09/10] linux-user/strace: Improve bind() output Laurent Vivier

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=20181010223656.31632-5-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=agx@sigxcpu.org \
    --cc=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).