qemu: Return meaningful error when qemu dies early
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 <62bdf77dc47919a4d59a91822129d14633cfca81@redhat.com>

agx/libvirt,andreabolognani/libvirt,agx/libvirt,taget/libvirt,taget/libvirt,olafhering/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,shugaoye/libvirt,taget/libvirt,crobinso/libvirt,rlaager/libvirt,zippy2/libvirt,datto/libvirt,zippy2/libvirt,datto/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,libvirt/libvirt,taget/libvirt,jfehlig/libvirt,shugaoye/libvirt,nertpinx/libvirt,jfehlig/libvirt,taget/libvirt,VenkatDatta/libvirt,zippy2/libvirt,jardasgit/libvirt,nertpinx/libvirt,crobinso/libvirt,agx/libvirt,agx/libvirt,datto/libvirt,fabianfreyer/libvirt,shugaoye/libvirt,zippy2/libvirt,jfehlig/libvirt,VenkatDatta/libvirt,shugaoye/libvirt,jardasgit/libvirt,libvirt/libvirt,jardasgit/libvirt,elmarco/libvirt,andreabolognani/libvirt,eskultety/libvirt,datto/libvirt,olafhering/libvirt,elmarco/libvirt,elmarco/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,eskultety/libvirt,datto/libvirt,eskultety/libvirt,jardasgit/libvirt,eskultety/libvirt,crobinso/libvirt,rlaager/libvirt,olafhering/libvirt,fabianfreyer/libvirt,elmarco/libvirt,shugaoye/libvirt,rlaager/libvirt,libvirt/libvirt,olafhering/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,agx/libvirt,elmarco/libvirt,eskultety/libvirt,rlaager/libvirt,rlaager/libvirt,crobinso/libvirt,nertpinx/libvirt,libvirt/libvirt,jfehlig/libvirt,nertpinx/libvirt,fabianfreyer/libvirt