[CRIU] [PATCH 05/10] image.h: Move sk-unix stuff into .c file

Pavel Emelyanov xemul at virtuozzo.com
Fri May 20 09:53:40 PDT 2016


Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/include/image.h | 18 ------------------
 criu/sk-unix.c       | 19 ++++++++++++++++++-
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/criu/include/image.h b/criu/include/image.h
index f141915..51f90f1 100644
--- a/criu/include/image.h
+++ b/criu/include/image.h
@@ -26,24 +26,6 @@
 #define REMAP_GHOST	(1 << 31)
 
 /*
- * By-default, when dumping a unix socket, we should dump its peer
- * as well. Which in turn means, we should dump the task(s) that have
- * this peer opened.
- *
- * Sometimes, we can break this rule and dump only one end of the
- * unix sockets pair, and on restore time connect() this end back to
- * its peer.
- *
- * So, to resolve this situation we mark the peers we don't dump
- * as "external" and require the --ext-unix-sk option.
- */
-
-#define USK_EXTERN	(1 << 0)
-#define USK_SERVICE	(1 << 1)
-#define USK_CALLBACK	(1 << 2)
-#define USK_INHERIT	(1 << 3)
-
-/*
  * VMA_AREA status:
  *
  *  - none
diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index e18480d..f864183 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -17,7 +17,6 @@
 #include "unix_diag.h"
 #include "files.h"
 #include "file-ids.h"
-#include "image.h"
 #include "log.h"
 #include "util.h"
 #include "util-pie.h"
@@ -36,6 +35,24 @@
 #undef	LOG_PREFIX
 #define LOG_PREFIX "sk unix: "
 
+/*
+ * By-default, when dumping a unix socket, we should dump its peer
+ * as well. Which in turn means, we should dump the task(s) that have
+ * this peer opened.
+ *
+ * Sometimes, we can break this rule and dump only one end of the
+ * unix sockets pair, and on restore time connect() this end back to
+ * its peer.
+ *
+ * So, to resolve this situation we mark the peers we don't dump
+ * as "external" and require the --ext-unix-sk option.
+ */
+
+#define USK_EXTERN	(1 << 0)
+#define USK_SERVICE	(1 << 1)
+#define USK_CALLBACK	(1 << 2)
+#define USK_INHERIT	(1 << 3)
+
 typedef struct {
 	char			*dir;
 	unsigned int		udiag_vfs_dev;
-- 
2.5.0



More information about the CRIU mailing list