From: Dmitry V. Levin Date: Wed, 3 Dec 2014 21:06:11 +0000 (+0000) Subject: Move personality parser to a separate file X-Git-Tag: v4.10~341 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d28b6a0264f14dd997b64308f254d0bf967505f8;p=strace Move personality parser to a separate file * personality.c: New file. * Makefile.am (strace_SOURCES): Add it. * system.c: Move sys_personality and related code to personality.c. --- diff --git a/Makefile.am b/Makefile.am index a87f4a52..707f4860 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,6 +41,7 @@ strace_SOURCES = \ net.c \ or1k_atomic.c \ pathtrace.c \ + personality.c \ process.c \ ptp.c \ quota.c \ diff --git a/personality.c b/personality.c new file mode 100644 index 00000000..a90d7dd7 --- /dev/null +++ b/personality.c @@ -0,0 +1,13 @@ +#include "defs.h" + +#include + +#include "xlat/personality_options.h" + +int +sys_personality(struct tcb *tcp) +{ + if (entering(tcp)) + printxval(personality_options, tcp->u_arg[0], "PER_???"); + return 0; +} diff --git a/system.c b/system.c index 7e1ab72a..91a471bc 100644 --- a/system.c +++ b/system.c @@ -60,8 +60,6 @@ #define MS_MGC_VAL 0xc0ed0000 /* Magic flag number */ #define MS_MGC_MSK 0xffff0000 /* Magic flag mask */ -#include - #include "xlat/mount_flags.h" int @@ -119,15 +117,3 @@ sys_umount2(struct tcb *tcp) } return 0; } - -/* These are not macros, but enums. We just copy the values by hand - from Linux 2.6.9 here. */ -#include "xlat/personality_options.h" - -int -sys_personality(struct tcb *tcp) -{ - if (entering(tcp)) - printxval(personality_options, tcp->u_arg[0], "PER_???"); - return 0; -}