From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] vmdk: support vmfsSparse files
Date: Mon, 12 Aug 2013 13:45:02 +0200 [thread overview]
Message-ID: <CAJSP0QU8ACAkSwREmjqkmBntcv7VUhvvZZLQe5RWbFPiJ13Xxg@mail.gmail.com> (raw)
In-Reply-To: <20130812112814.GA20725@stefanha-thinkpad.redhat.com>
On Mon, Aug 12, 2013 at 1:28 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Sun, Aug 11, 2013 at 06:13:57PM +0200, Paolo Bonzini wrote:
>> @@ -505,6 +505,34 @@ static int vmdk_open_vmdk3(BlockDriverState *bs,
>> return ret;
>> }
>>
>> +static int vmdk_open_vmfs_sparse(BlockDriverState *bs,
>> + BlockDriverState *file,
>> + int flags)
>> +{
>> + int ret;
>> + uint32_t magic;
>> + VMDK3Header header;
>> + VmdkExtent *extent;
>> +
>> + ret = bdrv_pread(file, sizeof(magic), &header, sizeof(header));
>> + if (ret < 0) {
>> + return ret;
>> + }
>
> magic is unused. Did you forget to check it?
Andreas Färber pointed out that we're only using the sizeof(magic),
not the actual variable.
Feel free to ignore my comment, at least the code documents that the
uint32_t offset belongs to the magic number before the header.
Stefan
next prev parent reply other threads:[~2013-08-12 11:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-11 16:13 [Qemu-devel] [PATCH 0/2] vmdk: Support ESX files Paolo Bonzini
2013-08-11 16:13 ` [Qemu-devel] [PATCH 1/2] vmdk: support vmfsSparse files Paolo Bonzini
2013-08-12 1:31 ` Fam Zheng
2013-08-12 7:40 ` Paolo Bonzini
2013-08-12 9:10 ` Fam Zheng
2013-08-12 8:39 ` Andreas Färber
2013-08-12 11:28 ` Stefan Hajnoczi
2013-08-12 11:45 ` Stefan Hajnoczi [this message]
2013-08-11 16:13 ` [Qemu-devel] [PATCH 2/2] vmdk: support vmfs files Paolo Bonzini
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=CAJSP0QU8ACAkSwREmjqkmBntcv7VUhvvZZLQe5RWbFPiJ13Xxg@mail.gmail.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).