[CRIU] [PATCH v5 07/11] unix: Export packets_list and struct packet

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jun 16 06:54:01 PDT 2016


v5: New

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/include/sk-queue.h |   11 +++++++++++
 criu/sk-queue.c         |    8 +-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/criu/include/sk-queue.h b/criu/include/sk-queue.h
index 5fd2e01..e3d8dff 100644
--- a/criu/include/sk-queue.h
+++ b/criu/include/sk-queue.h
@@ -1,8 +1,19 @@
 #ifndef __CR_SK_QUEUE_H__
 #define __CR_SK_QUEUE_H__
 
+#include "list.h"
+#include "images/sk-packet.pb-c.h"
+
 #define SK_NONAME_SENDER	(~0ULL)
 
+struct sk_packet {
+	struct list_head	list;
+	SkPacketEntry		*entry;
+	off_t			img_off;
+};
+
+extern struct list_head packets_list;
+
 extern struct collect_image_info sk_queues_cinfo;
 extern int dump_sk_queue(int sock_fd, int sock_id, u64 (*get_sender)(const char *, int));
 extern int restore_sk_queue(int fd, unsigned int peer_id);
diff --git a/criu/sk-queue.c b/criu/sk-queue.c
index ded9ca9..8e6556a 100644
--- a/criu/sk-queue.c
+++ b/criu/sk-queue.c
@@ -25,13 +25,7 @@
 #include "protobuf.h"
 #include "images/sk-packet.pb-c.h"
 
-struct sk_packet {
-	struct list_head	list;
-	SkPacketEntry		*entry;
-	off_t			img_off;
-};
-
-static LIST_HEAD(packets_list);
+LIST_HEAD(packets_list);
 
 static int collect_one_packet(void *obj, ProtobufCMessage *msg, struct cr_img *img)
 {



More information about the CRIU mailing list