aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-09-20 13:38:40 +0200
committerKevin Wolf <kwolf@redhat.com>2016-09-23 13:36:10 +0200
commit1c89e1fa2fb1414f4485a01924032ad9cdb9073d (patch)
tree881fd516e4ec8e932fc74613c02ead9da8c6a5c8 /include
parent6bed02805666035a59daa6a46935074f6f6d507d (diff)
downloadqemu-1c89e1fa2fb1414f4485a01924032ad9cdb9073d.zip
qemu-1c89e1fa2fb1414f4485a01924032ad9cdb9073d.tar.gz
qemu-1c89e1fa2fb1414f4485a01924032ad9cdb9073d.tar.bz2
block: Add blk_by_dev()
This finds a BlockBackend given the device model that is attached to it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include')
-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 4808a96..410eb68 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -111,6 +111,7 @@ int blk_attach_dev(BlockBackend *blk, void *dev);
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);
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);