mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-25 10:50:13 +03:00
libxl: Resolve Coverity CHECKED_RETURN
Periodically my Coverity scan will return a checked_return failure for libxlDomainShutdownThread call to libxlDomainStart. Followed the libxlAutostartDomain example in order to check the status, emit a message, and continue on.
This commit is contained in:
parent
5a36cdbcce
commit
4438646c0d
@ -685,7 +685,11 @@ libxlDomainShutdownThread(void *opaque)
|
|||||||
}
|
}
|
||||||
libxl_domain_destroy(ctx, vm->def->id, NULL);
|
libxl_domain_destroy(ctx, vm->def->id, NULL);
|
||||||
libxlDomainCleanupJob(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN);
|
libxlDomainCleanupJob(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN);
|
||||||
libxlDomainStart(driver, vm, 0, -1);
|
if (libxlDomainStart(driver, vm, false, -1) < 0) {
|
||||||
|
virErrorPtr err = virGetLastError();
|
||||||
|
VIR_ERROR(_("Failed to restart VM '%s': %s"),
|
||||||
|
vm->def->name, err ? err->message : _("unknown error"));
|
||||||
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vm)
|
if (vm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user