diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-19 13:04:01 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:50 +0200 |
commit | dbe5e6c1f73b41282624b78a2375a5c3ee59e905 (patch) | |
tree | ec2cad34f5b7d8a067166b251ab7743c86a595a1 /include/qemu/job.h | |
parent | b15de82867975e0b4acf644b5ee36d84904b6612 (diff) | |
download | qemu-dbe5e6c1f73b41282624b78a2375a5c3ee59e905.zip qemu-dbe5e6c1f73b41282624b78a2375a5c3ee59e905.tar.gz qemu-dbe5e6c1f73b41282624b78a2375a5c3ee59e905.tar.bz2 |
job: Replace BlockJob.completed with job_is_completed()
Since we introduced an explicit status to block job, BlockJob.completed
is redundant because it can be derived from the status. Remove the field
from BlockJob and add a function to derive it from the status at the Job
level.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'include/qemu/job.h')
-rw-r--r-- | include/qemu/job.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qemu/job.h b/include/qemu/job.h index bc63985..858f3be 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -214,6 +214,9 @@ const char *job_type_str(const Job *job); /** Returns whether the job is scheduled for cancellation. */ bool job_is_cancelled(Job *job); +/** Returns whether the job is in a completed state. */ +bool job_is_completed(Job *job); + /** * Request @job to pause at the next pause point. Must be paired with * job_resume(). If the job is supposed to be resumed by user action, call |