[Top][All Lists]
[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
- [Qemu-devel] [PATCH v6 00/12] Adding VMDK monolithic flat support, Fam Zheng, 2011/07/01
- [Qemu-devel] [PATCH v6 05/12] VMDK: add field BDRVVmdkState.desc_offset, Fam Zheng, 2011/07/01
- [Qemu-devel] [PATCH v6 06/12] VMDK: flush multiple extents, Fam Zheng, 2011/07/01
- [Qemu-devel] [PATCH v6 07/12] VMDK: move 'static' cid_update flag to bs field, Fam Zheng, 2011/07/01
- [Qemu-devel] [PATCH v6 08/12] VMDK: change get_cluster_offset return type, Fam Zheng, 2011/07/01
- [Qemu-devel] [PATCH v6 09/12] VMDK: open/read/write for monolithicFlat image, Fam Zheng, 2011/07/01
- [Qemu-devel] [PATCH v6 10/12] VMDK: create different subformats, Fam Zheng, 2011/07/01
- [Qemu-devel] [PATCH v6 11/12] VMDK: fix coding style, Fam Zheng, 2011/07/01