From 12fa4af61fb2a08b156134c3b6717534c637c995 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 17 Feb 2017 20:42:32 +0100 Subject: 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 Acked-by: Fam Zheng Reviewed-by: Max Reitz --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/vvfat.c') diff --git a/block/vvfat.c b/block/vvfat.c index 72b482cb1f..aa61c329e7 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -3041,7 +3041,7 @@ static int enable_write_target(BlockDriverState *bs, Error **errp) &error_abort); *(void**) backing->opaque = s; - bdrv_set_backing_hd(s->bs, backing); + bdrv_set_backing_hd(s->bs, backing, &error_abort); bdrv_unref(backing); return 0; -- cgit v1.2.3