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

2011-07-01 Thread Kevin Wolf
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_p

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

2011-07-01 Thread 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

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

2011-07-01 Thread Kevin Wolf
Am 01.07.2011 06:55, schrieb Fam Zheng: > Separate vmdk_open by subformats to: > * vmdk_open_vmdk3 > * vmdk_open_vmdk4 > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 197 ++--- > 1 files changed, 131 insertions(+), 66 deletions(-) > > di

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

2011-06-30 Thread Fam Zheng
Separate vmdk_open by subformats to: * vmdk_open_vmdk3 * vmdk_open_vmdk4 Signed-off-by: Fam Zheng --- block/vmdk.c | 197 ++--- 1 files changed, 131 insertions(+), 66 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 4684670..03248f