mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
block: use return status of bdrv_append()
Now bdrv_append returns status and we can drop all the local_err things around it. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <20210202124956.63146-3-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
a1e708fcda
commit
934aee14d3
6 changed files with 23 additions and 30 deletions
|
@ -254,7 +254,6 @@ void commit_start(const char *job_id, BlockDriverState *bs,
|
|||
BlockDriverState *iter;
|
||||
BlockDriverState *commit_top_bs = NULL;
|
||||
BlockDriverState *filtered_base;
|
||||
Error *local_err = NULL;
|
||||
int64_t base_size, top_size;
|
||||
uint64_t base_perms, iter_shared_perms;
|
||||
int ret;
|
||||
|
@ -312,10 +311,9 @@ void commit_start(const char *job_id, BlockDriverState *bs,
|
|||
|
||||
commit_top_bs->total_sectors = top->total_sectors;
|
||||
|
||||
bdrv_append(commit_top_bs, top, &local_err);
|
||||
if (local_err) {
|
||||
ret = bdrv_append(commit_top_bs, top, errp);
|
||||
if (ret < 0) {
|
||||
commit_top_bs = NULL;
|
||||
error_propagate(errp, local_err);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue