From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: armbru@redhat.com, stefanha@redhat.com, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 2/3] qcow2.py: Add required padding for header extensions
Date: Tue, 25 Nov 2014 18:23:43 +0100 [thread overview]
Message-ID: <5474BB1F.10907@redhat.com> (raw)
In-Reply-To: <1416935562-7760-3-git-send-email-kwolf@redhat.com>
On 2014-11-25 at 18:12, Kevin Wolf wrote:
> 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 <kwolf@redhat.com>
> ---
> 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
So it does work that way, great. *g*
> +
> self.magic = magic
> self.length = length
> self.data = data
Reviewed-by: Max Reitz <mreitz@redhat.com>
next prev parent reply other threads:[~2014-11-25 17:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 17:12 [Qemu-devel] [PATCH v2 0/3] block: Don't probe for unknown backing file format Kevin Wolf
2014-11-25 17:12 ` [Qemu-devel] [PATCH v2 1/3] qcow2: Fix header extension size check Kevin Wolf
2014-11-25 17:22 ` Max Reitz
2014-11-25 17:12 ` [Qemu-devel] [PATCH v2 2/3] qcow2.py: Add required padding for header extensions Kevin Wolf
2014-11-25 17:23 ` Max Reitz [this message]
2014-11-25 17:12 ` [Qemu-devel] [PATCH v2 3/3] block: Don't probe for unknown backing file format Kevin Wolf
2014-11-25 17:24 ` Max Reitz
2014-11-28 11:33 ` [Qemu-devel] [PATCH v2 0/3] " Stefan Hajnoczi
2014-12-02 10:23 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5474BB1F.10907@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).