diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-05-31 09:40:19 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-05-31 09:40:19 +0100 |
commit | fe817a8a0d4a2face895f692a7e061f0c98412b9 (patch) | |
tree | 55a28d5f5ba6aa569edb27a2efe91ff3852a5695 /include | |
parent | b5725385d17c876a12aa176a4a436d32d34ed06d (diff) | |
parent | 3fb588a0f2c006122c34e1960a15c87ae2b927eb (diff) |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches:
- Add blockdev-create job
- qcow2: Silence Coverity false positive
# gpg: Signature made Wed 30 May 2018 16:55:31 BST
# gpg: using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* remotes/kevin/tags/for-upstream:
block/create: Mark blockdev-create stable
qemu-iotests: Rewrite 213 for blockdev-create job
qemu-iotests: Rewrite 212 for blockdev-create job
qemu-iotests: Rewrite 211 for blockdev-create job
qemu-iotests: Rewrite 210 for blockdev-create job
qemu-iotests: Rewrite 207 for blockdev-create job
qemu-iotests: Rewrite 206 for blockdev-create job
qemu-iotests: iotests.py helper for non-file protocols
qemu-iotests: Add VM.run_job()
qemu-iotests: Add iotests.img_info_log()
qemu-iotests: Add VM.qmp_log()
qemu-iotests: Add VM.get_qmp_events_filtered()
block/create: Make x-blockdev-create a job
job: Add error message for failing jobs
vhdx: Fix vhdx_co_create() return value
vdi: Fix vdi_co_do_create() return value
qcow2: Fix Coverity warning when calculating the refcount cache size
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/job.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/qemu/job.h b/include/qemu/job.h index 8c8badf75e..1d820530fa 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -124,6 +124,9 @@ typedef struct Job { /** Estimated progress_current value at the completion of the job */ int64_t progress_total; + /** Error string for a failed job (NULL if, and only if, job->ret == 0) */ + char *error; + /** ret code passed to job_completed. */ int ret; @@ -466,13 +469,15 @@ void job_transition_to_ready(Job *job); /** * @job: The job being completed. * @ret: The status code. + * @error: The error message for a failing job (only with @ret < 0). If @ret is + * negative, but NULL is given for @error, strerror() is used. * * Marks @job as completed. If @ret is non-zero, the job transaction it is part * of is aborted. If @ret is zero, the job moves into the WAITING state. If it * is the last job to complete in its transaction, all jobs in the transaction * move from WAITING to PENDING. */ -void job_completed(Job *job, int ret); +void job_completed(Job *job, int ret, Error *error); /** Asynchronously complete the specified @job. */ void job_complete(Job *job, Error **errp); |