aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2020-03-11 13:29:56 +0300
committerMichael Roth <mdroth@linux.vnet.ibm.com>2020-06-03 19:53:06 -0500
commita0dc4d24950ca2cf16eafb7a08df4f534a696623 (patch)
tree5dfc976fc25daf329725d9b33ee7f8b73de0498a /qemu-img.c
parente0ccde388779ae22a1070c180c8e4df09888f77e (diff)
downloadqemu-a0dc4d24950ca2cf16eafb7a08df4f534a696623.zip
qemu-a0dc4d24950ca2cf16eafb7a08df4f534a696623.tar.gz
qemu-a0dc4d24950ca2cf16eafb7a08df4f534a696623.tar.bz2
job: refactor progress to separate object
We need it in separate to pass to the block-copy object in the next commit. Cc: qemu-stable@nongnu.org Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200311103004.7649-2-vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com> (cherry picked from commit 01fe1ca945345d3dc420d70c69488143dc0451b1) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 95a24b9..9ae07bb 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -881,9 +881,9 @@ static void run_block_job(BlockJob *job, Error **errp)
do {
float progress = 0.0f;
aio_poll(aio_context, true);
- if (job->job.progress_total) {
- progress = (float)job->job.progress_current /
- job->job.progress_total * 100.f;
+ if (job->job.progress.total) {
+ progress = (float)job->job.progress.current /
+ job->job.progress.total * 100.f;
}
qemu_progress_print(progress, 0);
} while (!job_is_ready(&job->job) && !job_is_completed(&job->job));