
On 06/10/2015 07:31 AM, Jiri Denemark wrote:
On Wed, Jun 10, 2015 at 07:21:27 -0400, John Ferlan wrote:
On 06/02/2015 08:34 AM, Jiri Denemark wrote:
The wrapper is useful for calling qemuBlockJobEventProcess with the event details stored in disk's privateData, which is the most likely usage of qemuBlockJobEventProcess.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
...
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 098a43a..605c2a5 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c ... @@ -218,9 +243,7 @@ qemuBlockJobSyncEnd(virQEMUDriverPtr driver, if (diskPriv->blockJobSync && diskPriv->blockJobStatus != -1) { if (ret_status) *ret_status = diskPriv->blockJobStatus; - qemuBlockJobEventProcess(driver, vm, disk, - diskPriv->blockJobType, - diskPriv->blockJobStatus); + qemuBlockJobUpdate(driver, vm, disk);
^^ This doesn't get the returned status...
qemuBlockJobUpdate returns the original value of diskPriv->blockJobStatus, which is already stored to *ret_status above. Not to mention that one of the following patches will completely remove ret_status from qemuBlockJobSyncEnd.
I was just perusing to 'learn' a bit about the code... I hadn't looked forward yet. In essence it's a void function though... I see that qemuBlockJobUpdate checks/sets blockJobStatus = -1 and the same setting is done right after the call. John