diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-01-13 19:02:32 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-02-28 20:40:36 +0100 |
commit | d7086422b1c1e75e320519cfe26176db6ec97a37 (patch) | |
tree | 5b8cc8a489ee05f6432288590f1b621bccfa39c4 /include/sysemu/block-backend.h | |
parent | 6d0eb64d5c6d57017c52a4f36ccae1db79215ee1 (diff) |
block: Add error parameter to blk_insert_bs()
Now that blk_insert_bs() requests the BlockBackend permissions for the
node it attaches to, it can fail. Instead of aborting, pass the errors
to the callers.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'include/sysemu/block-backend.h')
-rw-r--r-- | include/sysemu/block-backend.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 6651f437db..08611136b7 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -102,7 +102,7 @@ BlockBackend *blk_by_public(BlockBackendPublic *public); BlockDriverState *blk_bs(BlockBackend *blk); void blk_remove_bs(BlockBackend *blk); -void blk_insert_bs(BlockBackend *blk, BlockDriverState *bs); +int blk_insert_bs(BlockBackend *blk, BlockDriverState *bs, Error **errp); bool bdrv_has_blk(BlockDriverState *bs); bool bdrv_is_root_node(BlockDriverState *bs); int blk_set_perm(BlockBackend *blk, uint64_t perm, uint64_t shared_perm, |