On Thu, 2009-09-24 at 16:00 +0100, Daniel P. Berrange wrote: > Pull out all the QEMU monitor interaction code to a separate > file. This will make life easier when we need to drop in a > new implementation for the forthcoming QMP machine friendly > monitor support. > > Next step is to add formal APIs for each monitor command, > and remove direct commands for sending/receiving generic > data. > > * src/Makefile.am: Add qemu_monitor.c to build > * src/qemu/qemu_driver.c: Remove code for monitor interaction > * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: New > file for monitor interaction > --- > src/Makefile.am | 1 + > src/qemu/qemu_driver.c | 426 +---------------------------------------- > src/qemu/qemu_monitor_text.c | 437 ++++++++++++++++++++++++++++++++++++++++++ > src/qemu/qemu_monitor_text.h | 72 +++++++ > 4 files changed, 511 insertions(+), 425 deletions(-) > create mode 100644 src/qemu/qemu_monitor_text.c > create mode 100644 src/qemu/qemu_monitor_text.h > > diff --git a/src/Makefile.am b/src/Makefile.am > index 9cbec47..7520e96 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -169,6 +169,7 @@ VBOX_DRIVER_EXTRA_DIST = vbox/vbox_tmpl.c vbox/README > > QEMU_DRIVER_SOURCES = \ > qemu/qemu_conf.c qemu/qemu_conf.h \ > + qemu/qemu_monitor_text.c qemu/qemu_monitortext.h\ Typo > qemu/qemu_driver.c qemu/qemu_driver.h > > UML_DRIVER_SOURCES = \ ... > diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c > new file mode 100644 > index 0000000..76842a5 > --- /dev/null > +++ b/src/qemu/qemu_monitor_text.c > @@ -0,0 +1,437 @@ > +/* > + * qemu_monitor.h: interaction with QEMU monitor console > + * Incorrect header ... > + if (seen_volume) > + qemudReportError(conn, NULL, NULL, VIR_ERR_INVALID_DOMAIN, > + _("missing <encryption> for volume %s"), path); > + else > + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, > + _("unexpected passphrase request for volume %s"), > + path); Need qemu_monitor_text.c in POTFILES.in Otherwise, ACK Cheers, Mark. -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list