summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2013-10-09 10:46:16 +0200
committerKevin Wolf <kwolf@redhat.com>2013-10-11 10:52:54 +0200
commiteae041fe6f4314962e873615134eefb32cf8ba61 (patch)
tree669c134a3beade6ff5d9fb897a81630c449bae9d /block.c
parentf2bb8a8a47597634b74c161c44b9980c7f4e50ac (diff)
downloadqemu-eae041fe6f4314962e873615134eefb32cf8ba61.tar.gz
qemu-eae041fe6f4314962e873615134eefb32cf8ba61.tar.bz2
qemu-eae041fe6f4314962e873615134eefb32cf8ba61.zip
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>
Diffstat (limited to 'block.c')
-rw-r--r--block.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/block.c b/block.c
index d7ca37e6ad..43acaadbce 100644
--- a/block.c
+++ b/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)
{