From e5e785500bf1ca286f9069bc13f3ed8cb2e9eb8a Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 16 Mar 2016 19:54:37 +0100 Subject: blockdev: Separate BB name management Introduce separate functions (monitor_add_blk() and monitor_remove_blk()) which set or unset a BB name. Since the name is equivalent to the monitor's reference to a BB, adding a name the same as declaring the BB to be monitor-owned and removing it revokes this status, hence the function names. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 84612cefc8..c906c209b1 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -71,6 +71,8 @@ void blk_remove_all_bs(void); const char *blk_name(BlockBackend *blk); BlockBackend *blk_by_name(const char *name); BlockBackend *blk_next(BlockBackend *blk); +bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp); +void monitor_remove_blk(BlockBackend *blk); BlockDriverState *blk_bs(BlockBackend *blk); void blk_remove_bs(BlockBackend *blk); -- cgit v1.2.3-55-g7522