mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
block: Add bdrv_get_specific_info
Add a function for retrieving an ImageInfoSpecific object from a block driver. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
f2bb8a8a47
commit
eae041fe6f
4 changed files with 14 additions and 0 deletions
9
block.c
9
block.c
|
@ -3322,6 +3322,15 @@ int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
|
|||
return drv->bdrv_get_info(bs, bdi);
|
||||
}
|
||||
|
||||
ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs)
|
||||
{
|
||||
BlockDriver *drv = bs->drv;
|
||||
if (drv && drv->bdrv_get_specific_info) {
|
||||
return drv->bdrv_get_specific_info(bs);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf,
|
||||
int64_t pos, int size)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue