From 0d2187c4e0256ce1f3682cda9c6aadfa445a1c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 21 Oct 2019 13:48:51 +0200 Subject: linux-user/strace: Improve settimeofday() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther Reviewed-by: Laurent Vivier Message-Id: <20191021114857.20538-4-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 13 +++++++++++++ linux-user/strace.list | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/strace.c b/linux-user/strace.c index 2cd6687cd9..fd5596a640 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 863283418e..6f95466dc5 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 }, -- cgit v1.2.3