From d7086422b1c1e75e320519cfe26176db6ec97a37 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 13 Jan 2017 19:02:32 +0100 Subject: 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 Reviewed-by: Max Reitz Acked-by: Fam Zheng --- migration/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'migration/block.c') diff --git a/migration/block.c b/migration/block.c index 6b7ffd4eb6..d2599360a0 100644 --- a/migration/block.c +++ b/migration/block.c @@ -446,7 +446,7 @@ static void init_blk_migration(QEMUFile *f) BlockDriverState *bs = bmds_bs[i].bs; if (bmds) { - blk_insert_bs(bmds->blk, bs); + blk_insert_bs(bmds->blk, bs, &error_abort); alloc_aio_bitmap(bmds); error_setg(&bmds->blocker, "block device is in use by migration"); -- cgit v1.2.1