aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/block-backend.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-02-29 10:50:38 +0100
committerKevin Wolf <kwolf@redhat.com>2016-05-19 16:45:31 +0200
commitdde33812a83b9c55b180a85411bfc4d6c39e8b11 (patch)
treee5beba4ece97dcd013bf25b0ad5aaa9a62eb5fd6 /include/sysemu/block-backend.h
parent91c6e4b7bba906cfb8d84481da6340957f876c90 (diff)
block: Add bdrv_has_blk()
In many cases we just want to know whether a BDS has at least one BB attached, without needing to know the exact BB that is attached. In contrast to bs->blk, this is still a valid question when more than one BB can be attached, so just answer it by checking the parents list. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@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 79f39b889e..44a222d884 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -99,6 +99,7 @@ BlockBackend *blk_by_public(BlockBackendPublic *public);
BlockDriverState *blk_bs(BlockBackend *blk);
void blk_remove_bs(BlockBackend *blk);
void blk_insert_bs(BlockBackend *blk, BlockDriverState *bs);
+bool bdrv_has_blk(BlockDriverState *bs);
void blk_set_allow_write_beyond_eof(BlockBackend *blk, bool allow);
void blk_iostatus_enable(BlockBackend *blk);