qemudDomainMigrateFinish2: handle a case of virDomainSaveStatus failure

* src/qemu/qemu_driver.c (qemudDomainMigrateFinish2): Don't ignore
virDomainSaveStatus failure.
* src/conf/domain_conf.h (virDomainSaveStatus): Use
ATTRIBUTE_RETURN_CHECK, so this doesn't happen again.
This commit is contained in:
Jim Meyering 2010-05-19 17:48:03 +02:00
parent 33c721d323
commit 6aacf84a3b
2 changed files with 5 additions and 2 deletions

View File

@ -1011,7 +1011,7 @@ int virDomainSaveConfig(const char *configDir,
virDomainDefPtr def);
int virDomainSaveStatus(virCapsPtr caps,
const char *statusDir,
virDomainObjPtr obj);
virDomainObjPtr obj) ATTRIBUTE_RETURN_CHECK;
typedef void (*virDomainLoadConfigNotify)(virDomainObjPtr dom,
int newDomain,

View File

@ -10816,7 +10816,10 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
VIR_DOMAIN_EVENT_SUSPENDED,
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED);
}
virDomainSaveStatus(driver->caps, driver->stateDir, vm);
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0) {
VIR_WARN("Failed to save status on vm %s", vm->def->name);
goto endjob;
}
} else {
qemudShutdownVMDaemon(driver, vm, 0);
event = virDomainEventNewFromObj(vm,