From aa91dbfc09c7c42bea7f4caeb72b066e1d91b35f Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 10 Dec 2015 13:07:04 +0300 Subject: [PATCH] crit: Add dump method for shmem pages Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- pycriu/images/images.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pycriu/images/images.py b/pycriu/images/images.py index 7c01d3f19..c9146ab51 100644 --- a/pycriu/images/images.py +++ b/pycriu/images/images.py @@ -286,7 +286,12 @@ class ipc_shm_handler: return data.encode('base64') def dump(self, extra, f, pb): - raise Exception("Not yet implemented") + entry = pb2dict.pb2dict(pb) + size = entry['size'] + data = extra.decode('base64') + rounded = round_up(size, sizeof_u32) + f.write(data[:size]) + f.write('\0' * (rounded - size)) handlers = { 'INVENTORY' : entry_handler(inventory_entry),