block: Add Error parameter to bdrv_set_backing_hd()
commit12fa4af61fb2a08b156134c3b6717534c637c995
authorKevin Wolf <kwolf@redhat.com>
Fri, 17 Feb 2017 19:42:32 +0000 (17 20:42 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Feb 2017 19:47:51 +0000 (28 20:47 +0100)
treebd93d226c7af3454aa64b64bdb771b8fc5d22083
parentc8f6d58edb0defbe1e90d44419ec8ec6d711c341
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>
block.c
block/commit.c
block/mirror.c
block/stream.c
block/vvfat.c
include/block/block.h