On 16.04.2014 16:41, Kevin Wolf wrote:
Am 12.04.2014 um 20:57 hat Max Reitz geschrieben:
Implement block_job_complete_sync() by doing the exact same thing as
block_job_cancel_sync() does, only with calling block_job_complete()
instead of block_job_cancel().

Signed-off-by: Max Reitz <mre...@redhat.com>
---
  blockjob.c               | 24 ++++++++++++++++++++++--
  include/block/blockjob.h | 15 +++++++++++++++
  2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/blockjob.c b/blockjob.c
index b3ce14c..d12f3ea 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -165,7 +165,9 @@ static void block_job_cancel_cb(void *opaque, int ret)
      data->cb(data->opaque, ret);
  }
-int block_job_cancel_sync(BlockJob *job)
+static int block_job_finish_sync(BlockJob *job,
+                                 void (*finish)(BlockJob *, Error **errp),
+                                 Error **errp)
  {
      struct BlockCancelData data;
      BlockDriverState *bs = job->bs;
@@ -181,13 +183,31 @@ int block_job_cancel_sync(BlockJob *job)
      data.ret = -EINPROGRESS;
      job->cb = block_job_cancel_cb;
Rename this as block_job_finish_cb?

Yes, that makes sense.

Max

Reply via email to