The function is unused since commit
f21d96d0 ('block: Use BdrvChild in
BlockBackend').
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
return blk->root ? blk->root->bs : NULL;
}
-/*
- * 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.
*/
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);