Currently, only job->phase is passed and both APIs will need to look at
more details about the job.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_process.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index dd97cd7e7d..fd81933f2e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3034,7 +3034,7 @@ qemuProcessUpdateState(virQEMUDriverPtr driver, virDomainObjPtr vm)
static int
qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
virDomainObjPtr vm,
- qemuMigrationJobPhase phase,
+ const qemuDomainJobObj *job,
virDomainState state,
int reason)
{
@@ -3043,7 +3043,7 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
(state == VIR_DOMAIN_RUNNING &&
reason == VIR_DOMAIN_RUNNING_POSTCOPY);
- switch (phase) {
+ switch ((qemuMigrationJobPhase) job->phase) {
case QEMU_MIGRATION_PHASE_NONE:
case QEMU_MIGRATION_PHASE_PERFORM2:
case QEMU_MIGRATION_PHASE_BEGIN3:
@@ -3092,7 +3092,7 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
static int
qemuProcessRecoverMigrationOut(virQEMUDriverPtr driver,
virDomainObjPtr vm,
- qemuMigrationJobPhase phase,
+ const qemuDomainJobObj *job,
virDomainState state,
int reason,
unsigned int *stopFlags)
@@ -3102,7 +3102,7 @@ qemuProcessRecoverMigrationOut(virQEMUDriverPtr driver,
reason == VIR_DOMAIN_PAUSED_POSTCOPY_FAILED);
bool resume = false;
- switch (phase) {
+ switch ((qemuMigrationJobPhase) job->phase) {
case QEMU_MIGRATION_PHASE_NONE:
case QEMU_MIGRATION_PHASE_PREPARE:
case QEMU_MIGRATION_PHASE_FINISH2:
@@ -3197,13 +3197,13 @@ qemuProcessRecoverJob(virQEMUDriverPtr driver,
switch (job->asyncJob) {
case QEMU_ASYNC_JOB_MIGRATION_OUT:
- if (qemuProcessRecoverMigrationOut(driver, vm, job->phase,
+ if (qemuProcessRecoverMigrationOut(driver, vm, job,
state, reason, stopFlags) < 0)
return -1;
break;
case QEMU_ASYNC_JOB_MIGRATION_IN:
- if (qemuProcessRecoverMigrationIn(driver, vm, job->phase,
+ if (qemuProcessRecoverMigrationIn(driver, vm, job,
state, reason) < 0)
return -1;
break;
--
2.17.0