qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Guido Günther" <agx@sigxcpu.org>,
	"Riku Voipio" <riku.voipio@iki.fi>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL 05/11] linux-user/strace: Improve settimeofday()
Date: Tue, 22 Oct 2019 10:10:58 +0200	[thread overview]
Message-ID: <20191022081104.11814-6-laurent@vivier.eu> (raw)
In-Reply-To: <20191022081104.11814-1-laurent@vivier.eu>

From: Philippe Mathieu-Daudé <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>
Message-Id: <20191021114857.20538-4-f4bug@amsat.org>
Signed-off-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 2cd6687cd99b..fd5596a64074 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1583,6 +1583,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 863283418ef9..6f95466dc59d 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -1348,7 +1348,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.21.0



  parent reply	other threads:[~2019-10-22  8:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  8:10 [PULL 00/11] Linux user for 4.2 patches Laurent Vivier
2019-10-22  8:10 ` [PULL 01/11] linux-user: add strace for dup3 Laurent Vivier
2019-10-22  8:10 ` [PULL 02/11] Fix unsigned integer underflow in fd-trans.c Laurent Vivier
2019-10-22  8:10 ` [PULL 03/11] linux-user/strace: Display invalid pointer in print_timeval() Laurent Vivier
2019-10-22  8:10 ` [PULL 04/11] linux-user/strace: Add print_timezone() Laurent Vivier
2019-10-22  8:10 ` Laurent Vivier [this message]
2019-10-22  8:10 ` [PULL 06/11] linux-user/syscall: Introduce target_sockaddr_nl Laurent Vivier
2019-10-22  8:11 ` [PULL 07/11] linux-user/strace: Dump AF_NETLINK sockaddr content Laurent Vivier
2019-10-22  8:11 ` [PULL 08/11] linux-user/strace: Add print_sockfd() Laurent Vivier
2019-10-22  8:11 ` [PULL 09/11] linux-user/strace: Improve bind() output Laurent Vivier
2019-10-22  8:11 ` [PULL 10/11] linux-user/strace: Let print_sockaddr() have a 'last' argument Laurent Vivier
2019-10-22  8:11 ` [PULL 11/11] linux-user/syscall: Align target_sockaddr fields using ABI types Laurent Vivier
2019-10-22 11:02 ` [PULL 00/11] Linux user for 4.2 patches 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=20191022081104.11814-6-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=agx@sigxcpu.org \
    --cc=f4bug@amsat.org \
    --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).