]> xenbits.xensource.com Git - libvirt.git/commit
Issue full error messages when processing QEMU monitor I/O
authorDaniel P. Berrange <berrange@redhat.com>
Sun, 29 May 2011 12:51:08 +0000 (20:51 +0800)
committerDaniel Veillard <veillard@redhat.com>
Sun, 29 May 2011 12:51:08 +0000 (20:51 +0800)
commit80d2038d58af33778b5badd5ed443f108899f510
treeece9b894bf51652eb469cbffd76a63e9b79d31e9
parent4454a9efc728b91e791b1f14c26ea23a19d57f48
Issue full error messages when processing QEMU monitor I/O

Currently the QEMU monitor I/O handler code uses errno values
to report errors. This results in a sub-optimal error messages
on certain conditions, in particular when parsing JSON strings
malformed data simply results in 'EINVAL'.

This changes the code to use the standard libvirt error reporting
APIs. The virError is stored against the qemuMonitorPtr struct,
and when a monitor API is run, any existing stored error is copied
into that thread's error local

* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Use
  virError APIs for all monitor I/O handling code
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c