]> granicus.if.org Git - strace/blobdiff - clone.c
tests: check decoding of netlink smc_diag_msg attributes
[strace] / clone.c
diff --git a/clone.c b/clone.c
index 3bc1e22ec7d5407d8fc82441949769f9d2f31b46..a5f2b242e86926fec3e43faa14c4f5026ea4f1da 100644 (file)
--- a/clone.c
+++ b/clone.c
@@ -4,6 +4,7 @@
  * Copyright (c) 2008 Jan Kratochvil <jan.kratochvil@redhat.com>
  * Copyright (c) 2009-2013 Denys Vlasenko <dvlasenk@redhat.com>
  * Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2014-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,8 +31,8 @@
  */
 
 #include "defs.h"
-
 #include <sched.h>
+#include <asm/unistd.h>
 
 #ifndef CSIGNAL
 # define CSIGNAL 0x000000ff
@@ -76,7 +77,7 @@
 #endif
 
 static void
-print_tls_arg(struct tcb *const tcp, const kernel_ureg_t addr)
+print_tls_arg(struct tcb *const tcp, const kernel_ulong_t addr)
 {
 #ifdef HAVE_STRUCT_USER_DESC
 # if SUPPORTED_PERSONALITIES > 1
@@ -98,17 +99,17 @@ SYS_FUNC(clone)
 {
        if (exiting(tcp)) {
                const char *sep = "|";
-               unsigned long flags = tcp->u_arg[ARG_FLAGS];
+               kernel_ulong_t flags = tcp->u_arg[ARG_FLAGS];
                tprints("child_stack=");
                printaddr(tcp->u_arg[ARG_STACK]);
                tprints(", ");
 #ifdef ARG_STACKSIZE
                if (ARG_STACKSIZE != -1)
-                       tprintf("stack_size=%#lx, ",
+                       tprintf("stack_size=%#" PRI_klx ", ",
                                tcp->u_arg[ARG_STACKSIZE]);
 #endif
                tprints("flags=");
-               if (!printflags(clone_flags, flags &~ CSIGNAL, NULL))
+               if (!printflags64(clone_flags, flags & ~CSIGNAL, NULL))
                        sep = "";
                if ((flags & CSIGNAL) != 0)
                        tprintf("%s%s", sep, signame(flags & CSIGNAL));
@@ -154,7 +155,7 @@ SYS_FUNC(setns)
 
 SYS_FUNC(unshare)
 {
-       printflags64(unshare_flags, getarg_klu(tcp, 0), "CLONE_???");
+       printflags64(unshare_flags, tcp->u_arg[0], "CLONE_???");
        return RVAL_DECODED;
 }