From: Cole Robinson Date: Tue, 9 Feb 2010 19:45:35 +0000 (-0500) Subject: qemu: Properly report a startup timeout error X-Git-Tag: v0.7.7~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b65490a312557f6c2b6711c32c4f034fffae6ae0;p=thirdparty%2Flibvirt.git qemu: Properly report a startup timeout error The timeout errors were unconditionally being overwritten by the less helpful 'unable to start guest' error. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b009dd330a..9a26cc0302 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1351,15 +1351,15 @@ qemudReadLogOutput(virDomainObjPtr vm, buf[got] = '\0'; if (got == buflen-1) { qemuReportError(VIR_ERR_INTERNAL_ERROR, - _("Out of space while reading %s log output"), - what); + _("Out of space while reading %s log output: %s"), + what, buf); return -1; } if (isdead) { qemuReportError(VIR_ERR_INTERNAL_ERROR, - _("Process exited while reading %s log output"), - what); + _("Process exited while reading %s log output: %s"), + what, buf); return -1; } @@ -1371,7 +1371,8 @@ qemudReadLogOutput(virDomainObjPtr vm, } qemuReportError(VIR_ERR_INTERNAL_ERROR, - _("Timed out while reading %s log output"), what); + _("Timed out while reading %s log output: %s"), + what, buf); return -1; } @@ -1547,12 +1548,8 @@ qemudWaitForMonitor(struct qemud_driver* driver, virStrerror(errno, ebuf, sizeof ebuf)); } - if (ret < 0) { - /* Unexpected end of file - inform user of QEMU log data */ - qemuReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to start guest: %s"), buf); + if (ret < 0) return -1; - } VIR_DEBUG("Connect monitor to %p '%s'", vm, vm->def->name); if (qemuConnectMonitor(vm) < 0)