From: Eugene Syromyatnikov Date: Tue, 18 Oct 2016 18:17:33 +0000 (+0300) Subject: clone: use separate xlat for nstype parameter of setns syscall X-Git-Tag: v4.15~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b0ae21f5ca4f7628f382e3560fc73b29642b90c;p=strace clone: use separate xlat for nstype parameter of setns syscall nstype is not flag set but specific type value against which it is compared in kernel (see kernel/nsproxy.c, SYSCALL_DEFINE2(setns, ...)). * xlat/setns_types.in: New file. * clone.c: Use printxval and setns_types for nstype parameter. --- diff --git a/clone.c b/clone.c index 604a695e..0dd4fc95 100644 --- a/clone.c +++ b/clone.c @@ -38,6 +38,7 @@ #endif #include "xlat/clone_flags.h" +#include "xlat/setns_types.h" #if defined IA64 # define ARG_FLAGS 0 @@ -144,7 +145,7 @@ SYS_FUNC(setns) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - printflags(clone_flags, tcp->u_arg[1], "CLONE_???"); + printxval(setns_types, tcp->u_arg[1], "CLONE_NEW???"); return RVAL_DECODED; } diff --git a/xlat/setns_types.in b/xlat/setns_types.in new file mode 100644 index 00000000..09186f27 --- /dev/null +++ b/xlat/setns_types.in @@ -0,0 +1,8 @@ +0 +CLONE_NEWNS 0x00020000 +CLONE_NEWCGROUP 0x02000000 +CLONE_NEWUTS 0x04000000 +CLONE_NEWIPC 0x08000000 +CLONE_NEWUSER 0x10000000 +CLONE_NEWPID 0x20000000 +CLONE_NEWNET 0x40000000