Re: [REBASE PATCH v2 1/9] qemu: Add support for DUMP_COMPLETED event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux