From f15dfc61072a57d88275b8a04e76165d1285b1ea Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Thu, 27 Oct 2016 15:01:34 +0300 Subject: [PATCH] infect: Move __NR32_mmap into compel headers This remove parasite-syscall.h from infect. Signed-off-by: Pavel Emelyanov Signed-off-by: Andrei Vagin --- compel/arch/x86/src/lib/include/syscall.h | 9 +++++++++ criu/arch/x86/include/asm/parasite-syscall.h | 9 --------- criu/arch/x86/infect.c | 2 -- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/compel/arch/x86/src/lib/include/syscall.h b/compel/arch/x86/src/lib/include/syscall.h index 6d7df1861..9af1b1f99 100644 --- a/compel/arch/x86/src/lib/include/syscall.h +++ b/compel/arch/x86/src/lib/include/syscall.h @@ -1,4 +1,13 @@ #ifndef __COMPEL_SYSCALL_H__ #define __COMPEL_SYSCALL_H__ #define __NR(syscall, compat) ((compat) ? __NR32_##syscall : __NR_##syscall) + +/* + * For x86_32 __NR_mmap inside the kernel represents old_mmap system + * call, but since we didn't use it yet lets go further and simply + * define own alias for __NR_mmap2 which would allow us to unify code + * between 32 and 64 bits version. + */ +#define __NR32_mmap __NR32_mmap2 + #endif diff --git a/criu/arch/x86/include/asm/parasite-syscall.h b/criu/arch/x86/include/asm/parasite-syscall.h index fd5b26c7c..a2b5e75ff 100644 --- a/criu/arch/x86/include/asm/parasite-syscall.h +++ b/criu/arch/x86/include/asm/parasite-syscall.h @@ -5,13 +5,4 @@ struct parasite_ctl; -/* - * For x86_32 __NR_mmap inside the kernel represents old_mmap system - * call, but since we didn't use it yet lets go further and simply - * define own alias for __NR_mmap2 which would allow us to unify code - * between 32 and 64 bits version. - */ -#define __NR32_mmap __NR32_mmap2 - - #endif diff --git a/criu/arch/x86/infect.c b/criu/arch/x86/infect.c index 515b24294..0ac507916 100644 --- a/criu/arch/x86/infect.c +++ b/criu/arch/x86/infect.c @@ -6,7 +6,6 @@ #include #include "asm/processor-flags.h" -#include "asm/parasite-syscall.h" #include "uapi/std/syscall-codes.h" #include "compel/include/asm/syscall.h" #include "compel/include/asm/ptrace.h" @@ -15,7 +14,6 @@ #include "asm/types.h" #include "errno.h" #include "asm/cpu.h" -#include "parasite-syscall.h" #include "ptrace.h" #include "kerndat.h" #include "infect.h"