If this is correct I'll squash it with the v4 patch. --- src/qemu/qemu_domain.h | 4 ++-- src/qemu/qemu_driver.c | 6 ++---- src/qemu/qemu_migration.c | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index af513e7..effaebc 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -56,10 +56,10 @@ struct qemuDomainJobSignalsData { unsigned long migrateBandwidth; /* Data for QEMU_JOB_SIGNAL_MIGRATE_SPEED */ char *statDevName; /* Device name used by blkstat calls */ virDomainBlockStatsPtr blockStat; /* Block statistics for QEMU_JOB_SIGNAL_BLKSTAT */ - int statRetCode; /* Return code for the blkstat calls */ + int *statRetCode; /* Return code for the blkstat calls */ char *infoDevName; /* Device name used by blkinfo calls */ virDomainBlockInfoPtr blockInfo; /* Block information for QEMU_JOB_SIGNAL_BLKINFO */ - int infoRetCode; /* Return code for the blkinfo calls */ + int *infoRetCode; /* Return code for the blkinfo calls */ }; typedef struct _qemuDomainPCIAddressSet qemuDomainPCIAddressSet; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a4e430b..d4287dc 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5298,13 +5298,12 @@ qemudDomainBlockStats (virDomainPtr dom, priv->jobSignalsData.statDevName = disk->info.alias; priv->jobSignalsData.blockStat = stats; - priv->jobSignalsData.statRetCode = -1; + priv->jobSignalsData.statRetCode = &ret; priv->jobSignals |= QEMU_JOB_SIGNAL_BLKSTAT; while (priv->jobSignals & QEMU_JOB_SIGNAL_BLKSTAT) ignore_value(virCondWait(&priv->signalCond, &vm->lock)); - ret = priv->jobSignalsData.statRetCode; if (virDomainObjUnref(vm) == 0) vm = NULL; } else { @@ -5745,13 +5744,12 @@ static int qemuDomainGetBlockInfo(virDomainPtr dom, priv->jobSignalsData.infoDevName = disk->info.alias; priv->jobSignalsData.blockInfo = info; - priv->jobSignalsData.infoRetCode = -1; + priv->jobSignalsData.infoRetCode = &ret; priv->jobSignals |= QEMU_JOB_SIGNAL_BLKINFO; while (priv->jobSignals & QEMU_JOB_SIGNAL_BLKINFO) ignore_value(virCondWait(&priv->signalCond, &vm->lock)); - ret = priv->jobSignalsData.infoRetCode; if (virDomainObjUnref(vm) == 0) vm = NULL; } else { diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 28b168c..b767fb7 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -659,8 +659,8 @@ qemuMigrationProcessJobSignals(struct qemud_driver *driver, job, _("guest unexpectedly quit")); if (cleanup) { priv->jobSignals = 0; - priv->jobSignalsData.statRetCode = -1; - priv->jobSignalsData.infoRetCode = -1; + priv->jobSignalsData.statRetCode = NULL; + priv->jobSignalsData.infoRetCode = NULL; } return -1; } @@ -712,7 +712,7 @@ qemuMigrationProcessJobSignals(struct qemud_driver *driver, &priv->jobSignalsData.blockStat->errs); qemuDomainObjExitMonitorWithDriver(driver, vm); - priv->jobSignalsData.statRetCode = ret; + *priv->jobSignalsData.statRetCode = ret; priv->jobSignals ^= QEMU_JOB_SIGNAL_BLKSTAT; if (ret < 0) @@ -724,7 +724,7 @@ qemuMigrationProcessJobSignals(struct qemud_driver *driver, &priv->jobSignalsData.blockInfo->allocation); qemuDomainObjExitMonitorWithDriver(driver, vm); - priv->jobSignalsData.infoRetCode = ret; + *priv->jobSignalsData.infoRetCode = ret; priv->jobSignals ^= QEMU_JOB_SIGNAL_BLKINFO; if (ret < 0) -- 1.7.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list