]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_agent: Report error class at least
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Apr 2012 14:35:24 +0000 (16:35 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 28 Apr 2012 07:39:46 +0000 (09:39 +0200)
commit378031088fc95e576e517702f0ce2aa1fb30d8c3
tree48286208c9473a9cefbec16d42182440c3c1f560
parent59b935f5ae92e0833e71cc3b490cf1e24eee43fb
qemu_agent: Report error class at least

Currently, qemu GA is not providing 'desc' field for errors like
we are used to from qemu monitor. Therefore, we fall back to this
general 'unknown error' string. However, GA is reporting 'class' which
is not perfect, but much more helpful than generic error string.
Thus we should fall back to class firstly and if even no class
is presented, then we can fall back to that generic string.

Before this patch:
virsh # dompmsuspend --target mem f16
error: Domain f16 could not be suspended
error: internal error unable to execute QEMU command
'guest-suspend-ram': unknown QEMU command error

After this patch:
virsh # dompmsuspend --target mem f16
error: Domain f16 could not be suspended
error: internal error unable to execute QEMU command
'guest-suspend-ram': The command has not been found
src/qemu/qemu_agent.c