mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
block: Add 'active' field to BlockDeviceInfo
This allows querying from QMP (and also HMP) whether an image is currently active or inactive (in the sense of BDRV_O_INACTIVE). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20250204211407.381505-2-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
107c551de0
commit
aec81049c2
8 changed files with 39 additions and 3 deletions
4
block.c
4
block.c
|
@ -6824,6 +6824,10 @@ void bdrv_init_with_whitelist(void)
|
|||
bdrv_init();
|
||||
}
|
||||
|
||||
bool bdrv_is_inactive(BlockDriverState *bs) {
|
||||
return bs->open_flags & BDRV_O_INACTIVE;
|
||||
}
|
||||
|
||||
int bdrv_activate(BlockDriverState *bs, Error **errp)
|
||||
{
|
||||
BdrvChild *child, *parent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue