From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAN6N-0002ee-9g for qemu-devel@nongnu.org; Wed, 10 Oct 2018 18:37:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAN6K-0000N5-LM for qemu-devel@nongnu.org; Wed, 10 Oct 2018 18:37:10 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAN6J-0000JD-Eg for qemu-devel@nongnu.org; Wed, 10 Oct 2018 18:37:08 -0400 Received: by mail-wm1-x335.google.com with SMTP id r63-v6so7064151wma.4 for ; Wed, 10 Oct 2018 15:37:06 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 11 Oct 2018 00:36:50 +0200 Message-Id: <20181010223656.31632-5-f4bug@amsat.org> In-Reply-To: <20181010223656.31632-1-f4bug@amsat.org> References: <20181010223656.31632-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v5 04/10] linux-user/strace: Improve settimeofday() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Riku Voipio , =?UTF-8?q?Guido=20G=C3=BCnther?= Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther Reviewed-by: Laurent Vivier --- 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