On Fri, Jan 19, 2018 at 14:53:08 -0500, John Ferlan wrote: > The event is fired when the domain memory only dump completes. > > Wire up the code to extract and send along the status. > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > --- > src/qemu/qemu_monitor.c | 18 ++++++++++++++++++ > src/qemu/qemu_monitor.h | 19 +++++++++++++++++++ > src/qemu/qemu_monitor_json.c | 31 +++++++++++++++++++++++++++++++ > 3 files changed, 68 insertions(+) ... > +static void > +qemuMonitorJSONHandleDumpCompleted(qemuMonitorPtr mon, > + virJSONValuePtr data) > +{ > + const char *statusstr; > + qemuMonitorDumpStatus status; > + virJSONValuePtr result; > + > + if (!(result = virJSONValueObjectGetObject(data, "result"))) { > + VIR_WARN("missing result in dump completed event"); > + return; > + } > + > + if (!(statusstr = virJSONValueObjectGetString(result, "status"))) { > + VIR_WARN("missing status string in dump completed event"); > + return; > + } > + > + status = qemuMonitorDumpStatusTypeFromString(statusstr); > + if (status < 0) { > + VIR_WARN("invalid status string '%s' in dump completed event", > + statusstr); > + return; > + } > + > + qemuMonitorEmitDumpCompleted(mon, status); According to qapi-schema the DUMP_COMPLETED event may contain an error string. Don't we want to consume it here too? Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list