[CRIU] [PATCH 46/78] infect: Move __NR32_mmap into compel headers

Cyrill Gorcunov gorcunov at openvz.org
Mon Nov 7 08:36:31 PST 2016


From: Pavel Emelyanov <xemul at virtuozzo.com>

This remove parasite-syscall.h from infect.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 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 6d7df186179f..9af1b1f99406 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 fd5b26c7ce11..a2b5e75ff21f 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 6ba9774caaca..b261dd2895a7 100644
--- a/criu/arch/x86/infect.c
+++ b/criu/arch/x86/infect.c
@@ -6,7 +6,6 @@
 #include <sys/user.h>
 
 #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"
-- 
2.7.4



More information about the CRIU mailing list