]> xenbits.xensource.com Git - libvirt.git/commit
Make use of private data structure for monitor state
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 9 Oct 2009 19:13:29 +0000 (20:13 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 10 Nov 2009 12:14:30 +0000 (12:14 +0000)
commit1cfd5a00eb54680e7b1d4fab013ef4c42fb3de62
tree2dd95a9158bf34aa0a28426d0aaaf773f2cf80c2
parentff261941430258922b77f8ddb41439317b8fcfdb
Make use of private data structure for monitor state

Introduce a new qemuDomainObjPrivate object which is used to store
the private QEMU specific data associated with each virDomainObjPtr
instance. This contains a single member, an instance of the new
qemuMonitorPtr object which encapsulates the QEMU monitor state.
The internals of the latter are private to the qemu_monitor* files,
not to be shown to qemu_driver.c

* src/qemu/qemu_conf.h: Definition of qemuDomainObjPrivate.
* src/qemu/qemu_driver.c: Register a functions for creating
  and freeing qemuDomainObjPrivate instances with the domain
  capabilities. Remove the qemudDispatchVMEvent() watch since
  I/O watches are now handled by the monitor code itself. Pass
  a new qemuHandleMonitorEOF() callback into qemuMonitorOpen
  to allow notification when the monitor quits.
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Introduce
  the 'qemuMonitor' object. Temporarily add new APIs
  qemuMonitorWrite, qemuMonitorRead, qemuMonitorWaitForInput
  to allow text based monitor impl to perform I/O.
* src/qemu/qemu_monitor_text.c: Call APIs for reading/writing
  to monitor instead of accessing the file handle directly.
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_text.c