]> granicus.if.org Git - strace/commitdiff
Implement parsers of 64-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 (SYS_FUNC(clock_adjtime64)): New function.
[SPARC64] (SYS_FUNC(clock_sparc64_adjtime)): Likewise.
[HAVE_ARCH_OLD_TIME64_SYSCALLS] (SYS_FUNC(adjtimex64)): Likewise.

time.c

diff --git a/time.c b/time.c
index 75e65a5273e3c070c568a38488f48a03b58575f1..f150fda29e6336ac356f8659c7dc5c76c2d68dec 100644 (file)
--- a/time.c
+++ b/time.c
@@ -178,6 +178,19 @@ SYS_FUNC(adjtimex32)
 }
 #endif
 
+#if HAVE_ARCH_OLD_TIME64_SYSCALLS
+SYS_FUNC(adjtimex64)
+{
+       if (exiting(tcp))
+# ifndef SPARC64
+               return do_adjtimex(tcp, print_timex64, tcp->u_arg[0]);
+# else
+               return do_adjtimex(tcp, print_sparc64_timex, tcp->u_arg[0]);
+# endif
+       return 0;
+}
+#endif
+
 #include "xlat/clockflags.h"
 #include "xlat/clocknames.h"
 
@@ -303,6 +316,18 @@ SYS_FUNC(clock_adjtime32)
 }
 #endif
 
+SYS_FUNC(clock_adjtime64)
+{
+       return do_clock_adjtime(tcp, print_timex64);
+}
+
+#ifdef SPARC64
+SYS_FUNC(clock_sparc64_adjtime)
+{
+       return do_clock_adjtime(tcp, print_sparc64_timex);
+}
+#endif
+
 SYS_FUNC(timer_create)
 {
        if (entering(tcp)) {