]> granicus.if.org Git - strace/commitdiff
Implement parsers of 32-bit adjtimex and clock_adjtime syscalls
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 11 May 2019 22:35:56 +0000 (22:35 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 11 May 2019 22:35:56 +0000 (22:35 +0000)
* time.c [HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(adjtimex32),
SYS_FUNC(clock_adjtime32)): New functions.

time.c

diff --git a/time.c b/time.c
index 982c46758978a58295808b39b5849519a1aad41d..75e65a5273e3c070c568a38488f48a03b58575f1 100644 (file)
--- a/time.c
+++ b/time.c
@@ -169,6 +169,15 @@ SYS_FUNC(adjtimex)
        return 0;
 }
 
+#if HAVE_ARCH_TIME32_SYSCALLS
+SYS_FUNC(adjtimex32)
+{
+       if (exiting(tcp))
+               return do_adjtimex(tcp, print_timex32, tcp->u_arg[0]);
+       return 0;
+}
+#endif
+
 #include "xlat/clockflags.h"
 #include "xlat/clocknames.h"
 
@@ -287,6 +296,13 @@ SYS_FUNC(clock_adjtime)
        return do_clock_adjtime(tcp, print_timex);
 }
 
+#if HAVE_ARCH_TIME32_SYSCALLS
+SYS_FUNC(clock_adjtime32)
+{
+       return do_clock_adjtime(tcp, print_timex32);
+}
+#endif
+
 SYS_FUNC(timer_create)
 {
        if (entering(tcp)) {