From 7097a07d71d58ff4396d5361676b094ec58122d1 Mon Sep 17 00:00:00 2001 From: vm03 Date: Wed, 16 Oct 2019 16:58:34 +0300 Subject: [PATCH] add support for ZERO type --- payload_dumper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/payload_dumper.py b/payload_dumper.py index aedf048..d0daa70 100644 --- a/payload_dumper.py +++ b/payload_dumper.py @@ -83,6 +83,10 @@ def data_for_op(op,out_file,old_file): data = tmp_buff.read(ext.num_blocks*block_size) out_file.seek(ext.start_block*block_size) out_file.write(data) + elif op.type == op.ZERO: + for ext in op.dst_extents: + out_file.seek(ext.start_block*block_size) + out_file.write('\0' * ext.num_blocks*block_size) else: print ("Unsupported type = %d" % op.type) sys.exit(-1)