[CRIU] [PATCH 06/14] criu: add constants about user namespaces
Andrey Vagin
avagin at openvz.org
Tue Oct 14 04:38:20 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 f53f410..5b2143d 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -323,6 +323,7 @@ static struct show_image_info show_infos[] = {
SHOW_PLAINS(EXT_FILE),
SHOW_PLAIN(IRMAP_CACHE),
SHOW_PLAIN(CPUINFO),
+ SHOW_PLAIN(USERNS),
{ FILE_LOCKS_MAGIC, PB_FILE_LOCK, false, NULL, "3:%u", },
{ TCP_STREAM_MAGIC, PB_TCP_STREAM, true, show_tcp_stream, "1:%u 2:%u 3:%u 4:%u 12:%u", },
diff --git a/image-desc.c b/image-desc.c
index ff9043b..4be7551 100644
--- a/image-desc.c
+++ b/image-desc.c
@@ -88,6 +88,7 @@ struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX] = {
FD_ENTRY(CGROUP, "cgroup"),
FD_ENTRY(TIMERFD, "timerfd"),
FD_ENTRY(CPUINFO, "cpuinfo"),
+ FD_ENTRY(USERNS, "userns-%d"),
[CR_FD_STATS] = {
.fmt = "stats-%s",
diff --git a/include/image-desc.h b/include/image-desc.h
index 2570939..94c307f 100644
--- a/include/image-desc.h
+++ b/include/image-desc.h
@@ -26,6 +26,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 ff00a51..d9af16c 100644
--- a/include/magic.h
+++ b/include/magic.h
@@ -75,6 +75,7 @@
#define CGROUP_MAGIC 0x59383330 /* Tikhvin */
#define TIMERFD_MAGIC 0x50493712 /* Korocha */
#define CPUINFO_MAGIC 0x61404013 /* Nyandoma */
+#define USERNS_MAGIC 0x55474906 /* Kazan */
#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 f8b6d33..ec4ae7e 100644
--- a/include/protobuf-desc.h
+++ b/include/protobuf-desc.h
@@ -53,6 +53,7 @@ enum {
PB_CGROUP,
PB_TIMERFD,
PB_CPUINFO,
+ PB_USERNS,
/* PB_AUTOGEN_STOP */
diff --git a/protobuf-desc.c b/protobuf-desc.c
index ba1b377..873fd3b 100644
--- a/protobuf-desc.c
+++ b/protobuf-desc.c
@@ -60,6 +60,7 @@
#include "protobuf/cgroup.pb-c.h"
#include "protobuf/timerfd.pb-c.h"
#include "protobuf/cpuinfo.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