qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 04/12] VMDK: separate vmdk_open by format ver


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v6 04/12] VMDK: separate vmdk_open by format version
Date: Fri, 01 Jul 2011 15:13:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

Am 01.07.2011 15:06, schrieb Fam Zheng:
>>
>> bdrv_pread only ever returns 0 for success or -errno for errors. So you
>> can simplify the code like this:
>>
>> ret = bdrv_pread(...);
>> if (ret < 0) {
>>    goto fail_l1;
>> }
>>
>> You have the same pattern in other places, too.
> 
> I think bdrv_pead do return the read bytes, did you mean bdrv_read here? :)

Yes, you're right, it returns the read bytes. But it's always -errno or
the full byte count, there are no short reads. So my explanation wasn't
quite right, but the suggestion stays the same. :-)

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]