[CRIU] [PATCH 1/4] protbuf: Add Protocol Buffers (PB) helpers v3

Cyrill Gorcunov gorcunov at openvz.org
Fri Jul 6 17:03:24 EDT 2012


To not bloat util.h or image.h the protobuf.h introduced to
handle all PB needs.

We represent our PB objects as pairs of records

  | 4 bytes for object packed size
  +---
  | X bytes -- object itself

v3:
 - Use plain read/write calls
 - Use local buffers for small objects

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile           |    1 +
 include/protobuf.h |   49 +++++++++++++++++++
 protobuf.c         |  132 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 182 insertions(+), 0 deletions(-)
 create mode 100644 include/protobuf.h
 create mode 100644 protobuf.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-protbuf-Add-Protocol-Buffers-PB-helpers-v3.patch
Type: text/x-patch
Size: 4769 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120707/d5f92af3/0001-protbuf-Add-Protocol-Buffers-PB-helpers-v3-0001.bin


More information about the CRIU mailing list