diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2016-09-29 18:47:03 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2016-10-07 13:34:22 +0200 |
| commit | bbc8ea98bc8a2ba8174d106184f3089248d5ec5d (patch) | |
| tree | 1495f8f2dcfe8279cadb7243ad1b9a4ec69231a2 /include | |
| parent | 2bf7e10f78ebf67fbef364dce37ae844ba3c7a62 (diff) | |
| download | focaccia-qemu-bbc8ea98bc8a2ba8174d106184f3089248d5ec5d.tar.gz focaccia-qemu-bbc8ea98bc8a2ba8174d106184f3089248d5ec5d.zip | |
block-backend: Remember if attached device is non-qdev
Almost all block devices are qdevified by now. This allows us to go back from the BlockBackend to the DeviceState. xen_disk is the last device that is missing. We'll remember in the BlockBackend if a xen_disk is attached and can then disable any features that require going from a BB to the DeviceState. While at it, clearly mark the function used by xen_disk as legacy even in its name, not just in TODO comments. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sysemu/block-backend.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index a7993afcda..b07159b639 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -107,8 +107,8 @@ BlockDeviceIoStatus blk_iostatus(const BlockBackend *blk); 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, void *dev); -void blk_attach_dev_nofail(BlockBackend *blk, void *dev); +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); BlockBackend *blk_by_dev(void *dev); |