[CRIU] [PATCH 05/13] protobuf: add a new description for saving siginfo-s

Andrey Vagin avagin at openvz.org
Thu Dec 20 06:54:13 EST 2012


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/protobuf.h     | 1 +
 protobuf.c             | 2 ++
 protobuf/Makefile      | 1 +
 protobuf/siginfo.proto | 3 +++
 4 files changed, 7 insertions(+)
 create mode 100644 protobuf/siginfo.proto

diff --git a/include/protobuf.h b/include/protobuf.h
index 52f03f7..4823d4d 100644
--- a/include/protobuf.h
+++ b/include/protobuf.h
@@ -43,6 +43,7 @@ enum {
 	PB_INOTIFY_WD,
 	PB_TTY,
 	PB_TTY_INFO,
+	PB_SIGINFO,
 
 	PB_MAX
 };
diff --git a/protobuf.c b/protobuf.c
index f5ec1ea..f2299b6 100644
--- a/protobuf.c
+++ b/protobuf.c
@@ -49,6 +49,7 @@
 #include "protobuf/netdev.pb-c.h"
 #include "protobuf/tcp-stream.pb-c.h"
 #include "protobuf/tty.pb-c.h"
+#include "protobuf/siginfo.pb-c.h"
 
 typedef size_t (*pb_getpksize_t)(void *obj);
 typedef size_t (*pb_pack_t)(void *obj, void *where);
@@ -125,6 +126,7 @@ void cr_pb_init(void)
 	CR_PB_DESC(PACKETSK,		PacketSock,	packet_sock);
 	CR_PB_DESC(TTY,			TtyFile,	tty_file);
 	CR_PB_DESC(TTY_INFO,		TtyInfo,	tty_info);
+	CR_PB_DESC(SIGINFO,		Siginfo,	siginfo);
 }
 
 /*
diff --git a/protobuf/Makefile b/protobuf/Makefile
index c5e9314..ee91b98 100644
--- a/protobuf/Makefile
+++ b/protobuf/Makefile
@@ -37,6 +37,7 @@ PROTO_FILES	+= vma.proto
 PROTO_FILES	+= core.proto
 PROTO_FILES	+= netdev.proto
 PROTO_FILES	+= tty.proto
+PROTO_FILES	+= siginfo.proto
 
 PROTO_HDRS	:= $(patsubst %.proto,%.pb-c.h,$(PROTO_FILES))
 PROTO_SRCS	:= $(patsubst %.proto,%.pb-c.c,$(PROTO_FILES))
diff --git a/protobuf/siginfo.proto b/protobuf/siginfo.proto
new file mode 100644
index 0000000..e43eb88
--- /dev/null
+++ b/protobuf/siginfo.proto
@@ -0,0 +1,3 @@
+message siginfo_entry {
+	required bytes siginfo = 1;
+}
-- 
1.7.11.7



More information about the CRIU mailing list