[CRIU] [PATCH 3/5] criu: add constants about user namespaces
Andrey Vagin
avagin at openvz.org
Mon Feb 10 12:58:15 PST 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 8f808bc..964d7cf 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -321,6 +321,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 aa879e6..6d012d4 100644
--- a/image-desc.c
+++ b/image-desc.c
@@ -76,6 +76,7 @@ struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
FD_ENTRY(SIGNAL, "signal-s-%d"),
FD_ENTRY(PSIGNAL, "signal-p-%d"),
FD_ENTRY(TUNFILE, "tunfile"),
+ FD_ENTRY(USERNS, "userns-%d"),
[CR_FD_STATS] = {
.fmt = "stats-%s",
diff --git a/include/image-desc.h b/include/image-desc.h
index 2fe7cae..49f2d0d 100644
--- a/include/image-desc.h
+++ b/include/image-desc.h
@@ -31,6 +31,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 2ec553e..8b4d53c 100644
--- a/include/magic.h
+++ b/include/magic.h
@@ -72,6 +72,7 @@
#define NETLINK_SK_MAGIC 0x58005614 /* Perm */
#define NS_FILES_MAGIC 0x61394011 /* Nyandoma */
#define TUNFILE_MAGIC 0x57143751 /* Kalyazin */
+#define USERNS_MAGIC 0x59195653 /* Zarazili */
#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 4ad0aa5..801138c 100644
--- a/include/protobuf-desc.h
+++ b/include/protobuf-desc.h
@@ -50,6 +50,7 @@ enum {
PB_SIGINFO,
PB_TUNFILE,
PB_IRMAP_CACHE,
+ PB_USERNS,
/* PB_AUTOGEN_STOP */
diff --git a/protobuf-desc.c b/protobuf-desc.c
index a86ec38..1161288 100644
--- a/protobuf-desc.c
+++ b/protobuf-desc.c
@@ -57,6 +57,7 @@
#include "protobuf/sk-netlink.pb-c.h"
#include "protobuf/vma.pb-c.h"
#include "protobuf/tun.pb-c.h"
+#include "protobuf/userns.pb-c.h"
struct cr_pb_message_desc cr_pb_descs[PB_MAX];
--
1.8.5.3
More information about the CRIU
mailing list