[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH trivial] block.c: Correct the return value and t
From: |
Chen Gang |
Subject: |
Re: [Qemu-devel] [PATCH trivial] block.c: Correct the return value and the failure object when failure occurs |
Date: |
Mon, 23 Jun 2014 23:08:08 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 06/23/2014 03:38 PM, Stefan Hajnoczi wrote:
>
> The return value of bdrv_open() is a negative errno. -1 does not make
> sense in this case.
>
> Please add an int return value to bdrv_append_temp_snapshot() so the
> caller can determine the real errno. Then the remainder of the patch
> can be:
>
> if (snapshot_flags) {
> - bdrv_append_temp_snapshot(bs, snapshot_flags, &local_err);
> + ret = bdrv_append_temp_snapshot(bs, snapshot_flags, &local_err);
> if (local_err) {
> - error_propagate(errp, local_err);
> goto close_and_fail;
> }
> }
>
That's fine to me, I shall send patch v2 for it.
Thanks.
--
Chen Gang
Open share and attitude like air water and life which God blessed