aboutsummaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2020-03-11 13:29:56 +0300
committerMax Reitz <mreitz@redhat.com>2020-03-11 12:42:30 +0100
commit01fe1ca945345d3dc420d70c69488143dc0451b1 (patch)
treeef6844c0339c5eb16b6b47b74919db73aa41639a /job.c
parente7266570f2cf7b3ca2a156c677ee0a59d563458b (diff)
downloadqemu-01fe1ca945345d3dc420d70c69488143dc0451b1.zip
qemu-01fe1ca945345d3dc420d70c69488143dc0451b1.tar.gz
qemu-01fe1ca945345d3dc420d70c69488143dc0451b1.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>
Diffstat (limited to 'job.c')
-rw-r--r--job.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/job.c b/job.c
index 04409b4..134a07b 100644
--- a/job.c
+++ b/job.c
@@ -369,17 +369,17 @@ void job_unref(Job *job)
void job_progress_update(Job *job, uint64_t done)
{
- job->progress_current += done;
+ progress_work_done(&job->progress, done);
}
void job_progress_set_remaining(Job *job, uint64_t remaining)
{
- job->progress_total = job->progress_current + remaining;
+ progress_set_remaining(&job->progress, remaining);
}
void job_progress_increase_remaining(Job *job, uint64_t delta)
{
- job->progress_total += delta;
+ progress_increase_remaining(&job->progress, delta);
}
void job_event_cancelled(Job *job)