mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 21:38:16 +00:00
crit: Add dump method for shmem pages
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
57fbb4e5d3
commit
aa91dbfc09
@ -286,7 +286,12 @@ class ipc_shm_handler:
|
|||||||
return data.encode('base64')
|
return data.encode('base64')
|
||||||
|
|
||||||
def dump(self, extra, f, pb):
|
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 = {
|
handlers = {
|
||||||
'INVENTORY' : entry_handler(inventory_entry),
|
'INVENTORY' : entry_handler(inventory_entry),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user