diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-02-20 12:46:42 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-02-28 20:47:51 +0100 |
commit | b2c2832c6140cfe3ddc0de2d77eeb0b77dea8fd3 (patch) | |
tree | a8887134fb47b8dbd8c23a0cd4da55bc979ecbbb /include/block/block.h | |
parent | 12fa4af61fb2a08b156134c3b6717534c637c995 (diff) | |
download | qemu-b2c2832c6140cfe3ddc0de2d77eeb0b77dea8fd3.zip qemu-b2c2832c6140cfe3ddc0de2d77eeb0b77dea8fd3.tar.gz qemu-b2c2832c6140cfe3ddc0de2d77eeb0b77dea8fd3.tar.bz2 |
block: Add Error parameter to bdrv_append()
Aborting on error in bdrv_append() isn't correct. This patch fixes it
and lets the callers handle failures.
Test case 085 needs a reference output update. This is caused by the
reversed order of bdrv_set_backing_hd() and change_parent_backing_link()
in bdrv_append(): When the backing file of the new node is set, the
parent nodes are still pointing to the old top, so the backing blocker
is now initialised with the node name rather than the BlockBackend name.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index eac2861..c7c4a3a 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -236,7 +236,8 @@ int bdrv_create(BlockDriver *drv, const char* filename, QemuOpts *opts, Error **errp); int bdrv_create_file(const char *filename, QemuOpts *opts, Error **errp); BlockDriverState *bdrv_new(void); -void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top); +void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top, + Error **errp); void bdrv_replace_in_backing_chain(BlockDriverState *old, BlockDriverState *new); |