[CRIU] [PATCH v5 15/31] images: Move uid_gid_extent and userns_entry descriptions

Kirill Tkhai ktkhai at virtuozzo.com
Thu Feb 23 07:14:42 PST 2017


Move them into ns.proto file

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/include/namespaces.h |    2 +-
 criu/namespaces.c         |    1 -
 criu/protobuf-desc.c      |    1 -
 images/Makefile           |    1 -
 images/ns.proto           |   11 +++++++++++
 images/userns.proto       |   12 ------------
 6 files changed, 12 insertions(+), 16 deletions(-)
 delete mode 100644 images/userns.proto

diff --git a/criu/include/namespaces.h b/criu/include/namespaces.h
index 988c3c0b8..0c89c0c61 100644
--- a/criu/include/namespaces.h
+++ b/criu/include/namespaces.h
@@ -6,7 +6,7 @@
 #include "common/compiler.h"
 #include "files.h"
 #include "common/list.h"
-#include "images/userns.pb-c.h"
+#include "images/ns.pb-c.h"
 
 #ifndef CLONE_NEWNS
 #define CLONE_NEWNS	0x00020000
diff --git a/criu/namespaces.c b/criu/namespaces.c
index b998ab044..656584272 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -30,7 +30,6 @@
 #include "protobuf.h"
 #include "util.h"
 #include "images/ns.pb-c.h"
-#include "images/userns.pb-c.h"
 
 static struct ns_desc *ns_desc_array[] = {
 	&net_ns_desc,
diff --git a/criu/protobuf-desc.c b/criu/protobuf-desc.c
index bfe00c561..4676929b1 100644
--- a/criu/protobuf-desc.c
+++ b/criu/protobuf-desc.c
@@ -58,7 +58,6 @@
 #include "images/cgroup.pb-c.h"
 #include "images/timerfd.pb-c.h"
 #include "images/cpuinfo.pb-c.h"
-#include "images/userns.pb-c.h"
 #include "images/seccomp.pb-c.h"
 #include "images/binfmt-misc.pb-c.h"
 #include "images/autofs.pb-c.h"
diff --git a/images/Makefile b/images/Makefile
index 8a214d50d..0c1f6e714 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -52,7 +52,6 @@ proto-obj-y	+= siginfo.o
 proto-obj-y	+= rpc.o
 proto-obj-y	+= ext-file.o
 proto-obj-y	+= cgroup.o
-proto-obj-y	+= userns.o
 proto-obj-y	+= google/protobuf/descriptor.o # To make protoc-c happy and compile opts.proto
 proto-obj-y	+= opts.o
 proto-obj-y	+= seccomp.o
diff --git a/images/ns.proto b/images/ns.proto
index 5ff000165..7f7b09094 100644
--- a/images/ns.proto
+++ b/images/ns.proto
@@ -6,3 +6,14 @@ message ns_file_entry {
 	required uint32		ns_cflag	= 3;
 	required uint32		flags		= 4;
 }
+
+message uid_gid_extent {
+	required uint32 first			= 1;
+	required uint32 lower_first		= 2;
+	required uint32 count			= 3;
+}
+
+message userns_entry {
+	repeated uid_gid_extent uid_map		= 1;
+	repeated uid_gid_extent gid_map 	= 2;
+}
diff --git a/images/userns.proto b/images/userns.proto
deleted file mode 100644
index 16be6b161..000000000
--- a/images/userns.proto
+++ /dev/null
@@ -1,12 +0,0 @@
-syntax = "proto2";
-
-message uid_gid_extent {
-	required uint32 first		= 1;
-	required uint32 lower_first	= 2;
-	required uint32 count		= 3;
-}
-
-message userns_entry {
-	repeated uid_gid_extent uid_map	= 1;
-	repeated uid_gid_extent gid_map = 2;
-}



More information about the CRIU mailing list