[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[libvirt] [PATCH] qemu_process: print generic error if qemu exit without printing any error
- From: Pavel Hrdina <phrdina redhat com>
- To: libvir-list redhat com
- Subject: [libvirt] [PATCH] qemu_process: print generic error if qemu exit without printing any error
- Date: Mon, 30 May 2016 09:38:29 +0200
In this case we would print only the libvirt part of error message without any
explanation what happened:
"error: internal error: process exited while connecting to monitor:"
Let's print a generic error if this happens.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1335617
Signed-off-by: Pavel Hrdina <phrdina redhat com>
---
src/qemu/qemu_process.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e847cd1..86701da 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1808,6 +1808,13 @@ qemuProcessReportLogError(qemuDomainLogContextPtr logCtxt,
if (qemuProcessReadLog(logCtxt, &logmsg) < 0)
return -1;
+ if (virStringIsEmpty(logmsg)) {
+ VIR_FREE(logmsg);
+ if (VIR_STRDUP(logmsg, _("qemu process exited without any "
+ "error printed out")) < 0)
+ return -1;
+ }
+
virResetLastError();
virReportError(VIR_ERR_INTERNAL_ERROR,
_("%s: %s"), msgprefix, logmsg);
--
2.8.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]