]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Return meaningful error when qemu dies early
authorJiri Denemark <jdenemar@redhat.com>
Mon, 17 Mar 2014 10:04:07 +0000 (11:04 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 20 Mar 2014 21:25:56 +0000 (22:25 +0100)
commitcfa7ceab7735410c0427136236bf8bad10670816
treeae7fcd0d320186ff6ffd74b322b4936e752d6dc4
parent11cb128f2163a86158db436932e2cd9f5229c510
qemu: Return meaningful error when qemu dies early

https://bugzilla.redhat.com/show_bug.cgi?id=844378

When qemu dies early after connecting to its monitor but before we
actually try to read something from the monitor, we would just fail
domain start with useless message:

    "An error occurred, but the cause is unknown"

This is because the real error gets reported in a monitor EOF handler
executing within libvirt's event loop.

The fix is to take any error set in qemuMonitor structure and propagate
it into the thread-local error when qemuMonitorClose is called and no
thread-local error is set.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_monitor.c