diff options
-rw-r--r-- | block/block-backend.c | 17 | ||||
-rw-r--r-- | include/block/block_int.h | 2 |
2 files changed, 0 insertions, 19 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index adf592e..e578a2d 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -372,23 +372,6 @@ BlockDriverState *blk_bs(BlockBackend *blk) } /* - * Changes the BlockDriverState attached to @blk - */ -void blk_set_bs(BlockBackend *blk, BlockDriverState *bs) -{ - bdrv_ref(bs); - - if (blk->root) { - blk->root->bs->blk = NULL; - bdrv_root_unref_child(blk->root); - } - assert(bs->blk == NULL); - - blk->root = bdrv_root_attach_child(bs, "root", &child_root); - bs->blk = blk; -} - -/* * Return @blk's DriveInfo if any, else null. */ DriveInfo *blk_legacy_dinfo(BlockBackend *blk) diff --git a/include/block/block_int.h b/include/block/block_int.h index ba6e9ac..a33b0de 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -704,8 +704,6 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs, const BdrvChildRole *child_role); void bdrv_root_unref_child(BdrvChild *child); -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); bool blk_dev_has_tray(BlockBackend *blk); |