Skip to content

Commit

Permalink
linux-user/strace: Improve settimeofday()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and vivier committed Oct 21, 2019
1 parent 6d33e03 commit 0d2187c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions linux-user/strace.c
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion linux-user/strace.list
Expand Up @@ -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 },
Expand Down

0 comments on commit 0d2187c

Please sign in to comment.