qemu: nicer error message on failed graceful destroy

https://bugzilla.redhat.com/show_bug.cgi?id=795656 mentions
that a graceful destroy request can time out, meaning that the
error message is user-visible and should be more appropriate
than just internal error.

* src/qemu/qemu_driver.c (qemuDomainDestroyFlags): Swap error type.
This commit is contained in:
Eric Blake 2012-02-22 11:41:17 -07:00
parent d57485f73a
commit d2dc5057fd

View File

@ -1792,7 +1792,7 @@ qemuDomainDestroyFlags(virDomainPtr dom,
*/
if (flags & VIR_DOMAIN_DESTROY_GRACEFUL) {
if (qemuProcessKill(driver, vm, 0) < 0) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("failed to kill qemu process with SIGTERM"));
goto cleanup;
}