aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-02-17 20:42:32 +0100
committerKevin Wolf <kwolf@redhat.com>2017-02-28 20:47:51 +0100
commit12fa4af61fb2a08b156134c3b6717534c637c995 (patch)
treebd93d226c7af3454aa64b64bdb771b8fc5d22083 /include/block
parentc8f6d58edb0defbe1e90d44419ec8ec6d711c341 (diff)
block: Add Error parameter to bdrv_set_backing_hd()
Not all callers of bdrv_set_backing_hd() know for sure that attaching the backing file will be allowed by the permission system. Return the error from the function rather than aborting. 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')
-rw-r--r--include/block/block.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 07f7561886..eac286124d 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -247,7 +247,8 @@ BdrvChild *bdrv_open_child(const char *filename,
BlockDriverState* parent,
const BdrvChildRole *child_role,
bool allow_none, Error **errp);
-void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd);
+void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
+ Error **errp);
int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
const char *bdref_key, Error **errp);
BlockDriverState *bdrv_open(const char *filename, const char *reference,