On Tue, Sep 12, 2017 at 10:06:10 +0800, ZhiPeng Lu wrote: > The patch passes the reconnect timeout to QEMU by monitor on chardev hotplug. > > Signed-off-by: ZhiPeng Lu <lu.zhipeng@xxxxxxxxxx> > --- > src/qemu/qemu_monitor_json.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c > index df5fb7c..4169cd5 100644 > --- a/src/qemu/qemu_monitor_json.c > +++ b/src/qemu/qemu_monitor_json.c > @@ -6444,6 +6444,17 @@ int qemuMonitorJSONGetTPMTypes(qemuMonitorPtr mon, > return qemuMonitorJSONGetStringArray(mon, "query-tpm-types", tpmtypes); > } > > +static int > +qemuMonitorJSONBuildChrChardevReconnect(virJSONValuePtr object, > + const virDomainChrSourceReconnectDef *def) > +{ > + int ret = 0; > + if (def->enabled == VIR_TRISTATE_BOOL_YES) { > + ret = virJSONValueObjectAppendNumberUint(object, "reconnect", def->timeout); > + } Fails syntax check: Curly brackets around single-line body: src/qemu/qemu_monitor_json.c:6452-6454: if (def->enabled == VIR_TRISTATE_BOOL_YES) { ret = virJSONValueObjectAppendNumberUint(object, "reconnect", def->timeout); } Curly brackets around single-line body: src/qemu/qemu_monitor_json.c:6523-6525: if (qemuMonitorJSONBuildChrChardevReconnect(data, &chr->data.tcp.reconnect) < 0) { goto cleanup; } Curly brackets around single-line body: src/qemu/qemu_monitor_json.c:6564-6566: if (qemuMonitorJSONBuildChrChardevReconnect(data, &chr->data.nix.reconnect) < 0) { goto cleanup; } http://libvirt.org/hacking.html#curly_braces
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list