[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/43] qcow2.py: Add required padding for header ext
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 16/43] qcow2.py: Add required padding for header extensions |
Date: |
Tue, 24 Feb 2015 15:47:51 -0600 |
From: Kevin Wolf <address@hidden>
The qcow2 specification requires that the header extension data be
padded to round up the extension size to the next multiple of 8 bytes.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
(cherry picked from commit 8884dd1bbc5ce42cd657ffcbef3a477443468974)
Signed-off-by: Michael Roth <address@hidden>
---
tests/qemu-iotests/qcow2.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py
index 2058596..9cc4cf7 100755
--- a/tests/qemu-iotests/qcow2.py
+++ b/tests/qemu-iotests/qcow2.py
@@ -7,6 +7,10 @@ import string
class QcowHeaderExtension:
def __init__(self, magic, length, data):
+ if length % 8 != 0:
+ padding = 8 - (length % 8)
+ data += "\0" * padding
+
self.magic = magic
self.length = length
self.data = data
--
1.9.1
- [Qemu-devel] Patch Round-up for stable 2.2.1, freeze on 2015-03-05, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 09/43] iotests: Add test for unsupported image creation, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 10/43] qcow2: Prevent numerical overflow, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 13/43] block/raw-posix: Fix ret in raw_open_common(), Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 14/43] block migration: fix return value, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 11/43] qcow2: Flushing the caches in qcow2_close may fail, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 16/43] qcow2.py: Add required padding for header extensions,
Michael Roth <=
- [Qemu-devel] [PATCH 18/43] linuxboot: fix loading old kernels, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 19/43] audio: Don't free hw resources until after hw backend is stopped, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 17/43] block: Don't probe for unknown backing file format, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 12/43] qcow2: Respect bdrv_truncate() error, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 01/43] block: Make essential BlockDriver objects public, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 25/43] vl.c: fix regression when reading machine type from config file, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 24/43] PPC: Fix crash on spapr_tce_table_finalize(), Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 21/43] target-xtensa: test cross-page opcode, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 26/43] serial: reset thri_pending on IER writes with THRI=0, Michael Roth, 2015/02/24
- [Qemu-devel] [PATCH 23/43] atomic: fix position of volatile qualifier, Michael Roth, 2015/02/24