summaryrefslogtreecommitdiff
path: root/include/sysemu/block-backend.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-09-20 13:38:42 +0200
committerKevin Wolf <kwolf@redhat.com>2016-09-23 13:36:10 +0200
commit9680caee0fa530726809bc72d44e127ae676e251 (patch)
treef503fcf35a705b9dbb2a7ee39bed4990e38ebad1 /include/sysemu/block-backend.h
parent6c1db528b0e1a68c342d49d032af1c707e9de87c (diff)
downloadqemu-9680caee0fa530726809bc72d44e127ae676e251.tar.gz
qemu-9680caee0fa530726809bc72d44e127ae676e251.tar.bz2
qemu-9680caee0fa530726809bc72d44e127ae676e251.zip
qdev-monitor: Add blk_by_qdev_id()
This finds the BlockBackend attached to the device model identified by its qdev ID. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/sysemu/block-backend.h')
-rw-r--r--include/sysemu/block-backend.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 410eb68145..3b29317349 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -112,6 +112,7 @@ void blk_attach_dev_nofail(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);
+BlockBackend *blk_by_qdev_id(const char *id, Error **errp);
void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque);
int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf,
int count);