From a2d6190048d01c7012ab4fd6a2558f435b7b2fe8 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 17 Sep 2015 13:01:50 +0200 Subject: block-backend: Add blk_set_bs() It allows changing the BlockDriverState that a BlockBackend points to. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- include/block/block_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/block') diff --git a/include/block/block_int.h b/include/block/block_int.h index 4598101..cfcae52 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -659,6 +659,8 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target, BlockCompletionFunc *cb, void *opaque, Error **errp); +void blk_set_bs(BlockBackend *blk, BlockDriverState *bs); + void blk_dev_change_media_cb(BlockBackend *blk, bool load); bool blk_dev_has_removable_media(BlockBackend *blk); void blk_dev_eject_request(BlockBackend *blk, bool force); -- cgit v1.1