From d09ea2d22786e97c5c03cd4d4888f06bb89f8dc7 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 23 Jan 2019 09:56:01 +0100 Subject: block: Remove blk_attach_dev_legacy() / legacy_dev code The last user of blk_attach_dev_legacy() was the code in xen_disk which has recently been reworked. Now there is no user for this legacy function anymore. Thus we can finally remove all code related to the "legacy_dev" flag, too, and turn the related "void *" in block-backend.c into proper "DeviceState *" to fix some of the remaining TODOs there. Signed-off-by: Thomas Huth Reviewed-by: Stefano Garzarella Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index c8f816a200..832a4bf168 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -110,9 +110,8 @@ void blk_iostatus_disable(BlockBackend *blk); void blk_iostatus_reset(BlockBackend *blk); void blk_iostatus_set_err(BlockBackend *blk, int error); int blk_attach_dev(BlockBackend *blk, DeviceState *dev); -void blk_attach_dev_legacy(BlockBackend *blk, void *dev); -void blk_detach_dev(BlockBackend *blk, void *dev); -void *blk_get_attached_dev(BlockBackend *blk); +void blk_detach_dev(BlockBackend *blk, DeviceState *dev); +DeviceState *blk_get_attached_dev(BlockBackend *blk); char *blk_get_attached_dev_id(BlockBackend *blk); BlockBackend *blk_by_dev(void *dev); BlockBackend *blk_by_qdev_id(const char *id, Error **errp); -- cgit v1.2.3-55-g7522