[03/10] seccomp: Move seccomp_info into seccomp.h

Submitted by Cyrill Gorcunov on May 7, 2018, 8:42 a.m.

Details

Message ID 20180507084250.25191-4-gorcunov@gmail.com
State Accepted
Series "Per-thread seccomp support, v5"
Headers show

Commit Message

Cyrill Gorcunov May 7, 2018, 8:42 a.m.
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.

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

Patch hide | download patch | download mbox

diff --git a/criu/include/proc_parse.h b/criu/include/proc_parse.h
index e26173e68e01..0aaca3049698 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;