[CRIU] [PATCH 2/3] usernsd: move MAX_MSG_SIZE to namespaces.h

Tycho Andersen tycho.andersen at canonical.com
Thu Aug 13 15:58:50 PDT 2015


We'll use this size in the next patch to avoid having to do some dynamic
allocation.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 include/namespaces.h | 2 ++
 namespaces.c         | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/namespaces.h b/include/namespaces.h
index 52d2f34..bcaeda8 100644
--- a/include/namespaces.h
+++ b/include/namespaces.h
@@ -95,6 +95,8 @@ typedef int (*uns_call_t)(void *arg, int fd);
  */
 #define UNS_FDOUT	0x2
 
+#define MAX_MSG_SIZE	256
+
 /*
  * When we're restoring inside user namespace, some things are
  * not allowed to be done there due to insufficient capabilities.
diff --git a/namespaces.c b/namespaces.c
index 9ce4783..1677a7a 100644
--- a/namespaces.c
+++ b/namespaces.c
@@ -849,8 +849,6 @@ struct unsc_msg {
 	char c[CMSG_SPACE(sizeof(int))];
 };
 
-#define MAX_MSG_SIZE	256
-
 static int usernsd_pid;
 
 static inline void unsc_msg_init(struct unsc_msg *m, uns_call_t *c,
-- 
2.1.0



More information about the CRIU mailing list