[CRIU] [PATCH 04/11] criu: add constants about user namespaces

Andrey Vagin avagin at openvz.org
Wed Aug 13 00:51:31 PDT 2014


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-show.c               | 1 +
 image-desc.c            | 1 +
 include/image-desc.h    | 1 +
 include/magic.h         | 1 +
 include/protobuf-desc.h | 1 +
 protobuf-desc.c         | 1 +
 6 files changed, 6 insertions(+)

diff --git a/cr-show.c b/cr-show.c
index 5549c8d..63caff1 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -323,6 +323,7 @@ static struct show_image_info show_infos[] = {
 	SHOW_PLAIN(TUNFILE),
 	SHOW_PLAINS(EXT_FILE),
 	SHOW_PLAIN(IRMAP_CACHE),
+	SHOW_PLAIN(USERNS),
 
 	{ TCP_STREAM_MAGIC,	PB_TCP_STREAM,		true,	show_tcp_stream, "1:%u 2:%u 3:%u 4:%u 12:%u", },
 	{ STATS_MAGIC,		PB_STATS,		true,	NULL, "1.1:%u 1.2:%u 1.3:%u 1.4:%u 1.5:%Lu 1.6:%Lu 1.7:%Lu 1.8:%u", },
diff --git a/image-desc.c b/image-desc.c
index 1e0e3f0..21bdaec 100644
--- a/image-desc.c
+++ b/image-desc.c
@@ -79,6 +79,7 @@ struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
 	FD_ENTRY(TUNFILE,	"tunfile"),
 	FD_ENTRY(CGROUP,	"cgroup"),
 	FD_ENTRY(TIMERFD,	"timerfd"),
+	FD_ENTRY(USERNS,	"userns-%d"),
 
 	[CR_FD_STATS] = {
 		.fmt	= "stats-%s",
diff --git a/include/image-desc.h b/include/image-desc.h
index eb42990..ca368c3 100644
--- a/include/image-desc.h
+++ b/include/image-desc.h
@@ -28,6 +28,7 @@ enum {
 	 */
 	CR_FD_UTSNS,
 	CR_FD_MNTS,
+	CR_FD_USERNS,
 
 	_CR_FD_IPCNS_FROM,
 	CR_FD_IPC_VAR,
diff --git a/include/magic.h b/include/magic.h
index 5192a60..5d3747b 100644
--- a/include/magic.h
+++ b/include/magic.h
@@ -74,6 +74,7 @@
 #define TUNFILE_MAGIC		0x57143751 /* Kalyazin */
 #define CGROUP_MAGIC		0x59383330 /* Tikhvin */
 #define TIMERFD_MAGIC		0x50493712 /* Korocha */
+#define USERNS_MAGIC		0x59195653 /* Zarazily */
 
 #define IFADDR_MAGIC		RAW_IMAGE_MAGIC
 #define ROUTE_MAGIC		RAW_IMAGE_MAGIC
diff --git a/include/protobuf-desc.h b/include/protobuf-desc.h
index 01c9f4c..00ec50b 100644
--- a/include/protobuf-desc.h
+++ b/include/protobuf-desc.h
@@ -52,6 +52,7 @@ enum {
 	PB_IRMAP_CACHE,
 	PB_CGROUP,
 	PB_TIMERFD,
+	PB_USERNS,
 
 	/* PB_AUTOGEN_STOP */
 
diff --git a/protobuf-desc.c b/protobuf-desc.c
index b97418b..dbbd243 100644
--- a/protobuf-desc.c
+++ b/protobuf-desc.c
@@ -59,6 +59,7 @@
 #include "protobuf/tun.pb-c.h"
 #include "protobuf/cgroup.pb-c.h"
 #include "protobuf/timerfd.pb-c.h"
+#include "protobuf/userns.pb-c.h"
 
 struct cr_pb_message_desc cr_pb_descs[PB_MAX];
 
-- 
1.9.3



More information about the CRIU mailing list