job: Move single job finalisation to Job
This moves the finalisation of a single job from BlockJob to Job.
Some part of this code depends on job transactions, and job transactions
call this code, we introduce some temporary calls from Job functions to
BlockJob ones. This will be fixed once transactions move to Job, too.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
diff --git a/qemu-img.c b/qemu-img.c
index 2ab04b2..7419ec7 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -871,7 +871,7 @@
if (!job_is_completed(&job->job)) {
ret = block_job_complete_sync(job, errp);
} else {
- ret = job->ret;
+ ret = job->job.ret;
}
job_unref(&job->job);
aio_context_release(aio_context);