aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2015-07-27 17:51:32 +0200
committerKevin Wolf <kwolf@redhat.com>2015-12-18 14:34:43 +0100
commit8b13976d3fabee2f2900a9fb51c85b27ba4516b9 (patch)
tree594512dd25c37bcb5880b6b4acff0c4f6dc05e37 /qemu-img.c
parentbd5072d75622c3a702741064df87ea8911bae1a4 (diff)
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 <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 033011c4e7..b6b4c9e304 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2896,7 +2896,8 @@ out:
}
static void amend_status_cb(BlockDriverState *bs,
- int64_t offset, int64_t total_work_size)
+ int64_t offset, int64_t total_work_size,
+ void *opaque)
{
qemu_progress_print(100.f * offset / total_work_size, 0);
}
@@ -3020,7 +3021,7 @@ static int img_amend(int argc, char **argv)
/* In case the driver does not call amend_status_cb() */
qemu_progress_print(0.f, 0);
- ret = bdrv_amend_options(bs, opts, &amend_status_cb);
+ ret = bdrv_amend_options(bs, opts, &amend_status_cb, NULL);
qemu_progress_print(100.f, 0);
if (ret < 0) {
error_report("Error while amending options: %s", strerror(-ret));