[CRIU] [PATCH 3/9] seccomp: Move seccomp_info into seccomp.h

Cyrill Gorcunov gorcunov at gmail.com
Thu Apr 26 23:14:37 MSK 2018


This header is main place for all seccomp related
structures so move seccomp_info here. This will
allow to minimize changes area when need to update
definitions and such.

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 criu/include/proc_parse.h | 7 -------
 criu/include/seccomp.h    | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/criu/include/proc_parse.h b/criu/include/proc_parse.h
index c6856613031b..ca028e055449 100644
--- a/criu/include/proc_parse.h
+++ b/criu/include/proc_parse.h
@@ -4,7 +4,6 @@
 #include <sys/types.h>
 
 #include <compel/compel.h>
-#include "images/seccomp.pb-c.h"
 
 #define PROC_TASK_COMM_LEN	32
 #define PROC_TASK_COMM_LEN_FMT	"(%31s"
@@ -64,12 +63,6 @@ struct proc_pid_stat {
 	int			exit_code;
 };
 
-struct seccomp_info {
-	SeccompFilter filter;
-	int id;
-	struct seccomp_info *prev;
-};
-
 #define PROC_CAP_SIZE	2
 
 struct proc_status_creds {
diff --git a/criu/include/seccomp.h b/criu/include/seccomp.h
index 42ab9ab2d518..b50ea34e20bb 100644
--- a/criu/include/seccomp.h
+++ b/criu/include/seccomp.h
@@ -4,6 +4,7 @@
 #include <linux/seccomp.h>
 #include <linux/filter.h>
 
+#include "images/seccomp.pb-c.h"
 #include "images/core.pb-c.h"
 
 #ifndef SECCOMP_MODE_DISABLED
@@ -26,6 +27,12 @@
 #define SECCOMP_FILTER_FLAG_TSYNC 1
 #endif
 
+struct seccomp_info {
+	struct seccomp_info	*prev;
+	int			id;
+	SeccompFilter		filter;
+};
+
 extern int collect_seccomp_filters(void);
 extern int prepare_seccomp_filters(void);
 struct task_restore_args;
-- 
2.14.3



More information about the CRIU mailing list