From 8b13976d3fabee2f2900a9fb51c85b27ba4516b9 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Mon, 27 Jul 2015 17:51:32 +0200 Subject: block: Add opaque value to the amend CB Add an opaque value which is to be passed to the bdrv_amend_options() status callback. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- include/block/block.h | 4 ++-- include/block/block_int.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index 121544b3c3..bce0d868fe 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -306,9 +306,9 @@ int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix); * block driver; total_work_size may change during the course of the amendment * operation */ typedef void BlockDriverAmendStatusCB(BlockDriverState *bs, int64_t offset, - int64_t total_work_size); + int64_t total_work_size, void *opaque); int bdrv_amend_options(BlockDriverState *bs_new, QemuOpts *opts, - BlockDriverAmendStatusCB *status_cb); + BlockDriverAmendStatusCB *status_cb, void *cb_opaque); /* external snapshots */ bool bdrv_recurse_is_first_non_filter(BlockDriverState *bs, diff --git a/include/block/block_int.h b/include/block/block_int.h index edfe376ecc..9a1c466c84 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -243,7 +243,8 @@ struct BlockDriver { BdrvCheckMode fix); int (*bdrv_amend_options)(BlockDriverState *bs, QemuOpts *opts, - BlockDriverAmendStatusCB *status_cb); + BlockDriverAmendStatusCB *status_cb, + void *cb_opaque); void (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEvent event); -- cgit v1.2.3-55-g7522