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

Submitted by Pavel Emelianov on May 20, 2016, 4:53 p.m.

Details

Message ID 573F4114.9090005@virtuozzo.com
State Accepted
Series "Some cleanups over headers"
Commit 657d291b4ad72db649e1267688b43e3f357eab91
Headers show

Commit Message

Pavel Emelianov May 20, 2016, 4:53 p.m.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 criu/include/image.h | 18 ------------------
 criu/sk-unix.c       | 19 ++++++++++++++++++-
 2 files changed, 18 insertions(+), 19 deletions(-)

Patch hide | download patch | download mbox

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;