]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_process: don't print empty line if qemu exits without any error
authorPavel Hrdina <phrdina@redhat.com>
Wed, 8 Jun 2016 10:03:38 +0000 (12:03 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 8 Jun 2016 11:51:00 +0000 (13:51 +0200)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1335617

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_process.c

index 87c1fe81de077f6371faa091b961137754ddd0de..397dac7eefe7977bcbfc1f76e6b4fd1b2c80d5be 100644 (file)
@@ -1809,8 +1809,11 @@ qemuProcessReportLogError(qemuDomainLogContextPtr logCtxt,
         return -1;
 
     virResetLastError();
-    virReportError(VIR_ERR_INTERNAL_ERROR,
-                   _("%s: %s"), msgprefix, logmsg);
+    if (virStringIsEmpty(logmsg))
+        virReportError(VIR_ERR_INTERNAL_ERROR, "%s", msgprefix);
+    else
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("%s: %s"), msgprefix, logmsg);
+
     VIR_FREE(logmsg);
     return 0;
 }