From: Kevin Wolf <kwolf@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] dmg: use pread
Date: Tue, 11 May 2010 10:00:07 +0200 [thread overview]
Message-ID: <4BE90E87.3090206@redhat.com> (raw)
In-Reply-To: <20100510202022.GA26186@lst.de>
Am 10.05.2010 22:20, schrieb Christoph Hellwig:
> On Mon, May 10, 2010 at 12:07:40PM +0200, Kevin Wolf wrote:
>>> + if (type == 0x6d697368 && count >= 244) {
>>> int new_size, chunk_count;
>>> - if(lseek(s->fd,200,SEEK_CUR)<0)
>>> - goto fail;
>>> +
>>> + offset += 4;
>>
>> Isn't this needed in the else case, too?
>
> I don't think so. For that case we previously did a
>
> lseek(s->fd,count-4,SEEK_CUR)
>
> to undo the 4 byte advance done by the read.
You're right. Somehow I completely missed the original then branch and
that you changed the condition.
Kevin
next prev parent reply other threads:[~2010-05-11 8:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 14:55 [Qemu-devel] [PATCH 0/3] dmg updates Christoph Hellwig
2010-05-07 14:55 ` [Qemu-devel] [PATCH 1/3] dmg: fix reading of uncompressed chunks Christoph Hellwig
2010-05-07 14:56 ` [Qemu-devel] [PATCH 2/3] dmg: use pread Christoph Hellwig
2010-05-10 10:07 ` Kevin Wolf
2010-05-10 20:20 ` Christoph Hellwig
2010-05-11 8:00 ` Kevin Wolf [this message]
2010-05-12 14:31 ` [Qemu-devel] [PATCH 2/3 v2] " Christoph Hellwig
2010-05-07 14:56 ` [Qemu-devel] [PATCH 3/3] dmg: use qemu block API Christoph Hellwig
2010-05-12 14:31 ` [Qemu-devel] [PATCH 3/3 v2] " Christoph Hellwig
2010-05-12 15:51 ` 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=4BE90E87.3090206@redhat.com \
--to=kwolf@redhat.com \
--cc=hch@lst.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.