2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 08:45:49 +00:00

protobuf: Convert vma_entry to PB format v3

v2:
 - Use regular uint types in message proto
 - Use PB engine for "show"
v3:
 - drop usage of temp. variable in prepare_shmem_pid

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2012-07-19 12:43:36 +04:00
committed by Pavel Emelyanov
parent ffd40996ea
commit 4806e1395f
16 changed files with 63 additions and 59 deletions

View File

@@ -16,6 +16,8 @@
#include "types.h"
#include "log.h"
#include "../protobuf/vma.pb-c.h"
#define PREF_SHIFT_OP(pref, op, size) ((size) op (pref ##BYTES_SHIFT))
#define KBYTES_SHIFT 10
#define MBYTES_SHIFT 20
@@ -155,6 +157,7 @@ extern void pr_vma(unsigned int loglevel, const struct vma_area *vma_area);
({ \
struct vma_area *p__ = xzalloc(sizeof(*p__)); \
if (p__) { \
vma_entry__init(&p__->vma); \
p__->vm_file_fd = -1; \
p__->vma.fd = -1; \
} \