[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 81/88] qcow2.py: Add required padding for header ext
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 81/88] qcow2.py: Add required padding for header extensions |
Date: |
Thu, 8 Jan 2015 11:34:25 -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>
(cherry picked from commit a163ac3f57b5baa117158f7c0488d276ba3377e2)
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 74/88] iotests: Add test for unsupported image creation, (continued)
- [Qemu-devel] [PATCH 74/88] iotests: Add test for unsupported image creation, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 77/88] qcow2: Respect bdrv_truncate() error, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 80/88] qcow2: Fix header extension size check, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 76/88] qcow2: Flushing the caches in qcow2_close may fail, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 84/88] linuxboot: fix loading old kernels, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 83/88] linuxboot: compute initrd loading address, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 82/88] block: Don't probe for unknown backing file format, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 85/88] audio: Don't free hw resources until after hw backend is stopped, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 78/88] block/raw-posix: Fix ret in raw_open_common(), Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 75/88] qcow2: Prevent numerical overflow, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 81/88] qcow2.py: Add required padding for header extensions,
Michael Roth <=
- [Qemu-devel] [PATCH 86/88] target-xtensa: fix translation for opcodes crossing page boundary, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 88/88] pc: acpi: mark all possible CPUs as enabled in SRAT, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 87/88] target-xtensa: test cross-page opcode, Michael Roth, 2015/01/08
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Marcel Apfelbaum, 2015/01/09
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Paolo Bonzini, 2015/01/09
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, William Dauchy, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Marcel Apfelbaum, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Michael Roth, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Paolo Bonzini, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Michael Roth, 2015/01/13