Always assume JSON monitor was requested, since all the callers pass true anyway. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/qemu/qemu_monitor.c | 13 ++++--------- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_process.c | 3 +-- tests/qemumonitortestutils.c | 1 - 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index d9d076633d..87804e0956 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -809,7 +809,6 @@ static qemuMonitorPtr qemuMonitorOpenInternal(virDomainObjPtr vm, int fd, bool hasSendFD, - bool json, qemuMonitorCallbacksPtr cb, void *opaque) { @@ -840,9 +839,8 @@ qemuMonitorOpenInternal(virDomainObjPtr vm, mon->fd = fd; mon->hasSendFD = hasSendFD; mon->vm = virObjectRef(vm); - mon->json = json; - if (json) - mon->waitGreeting = true; + mon->json = true; + mon->waitGreeting = true; mon->cb = cb; mon->callbackOpaque = opaque; @@ -893,7 +891,6 @@ qemuMonitorOpenInternal(virDomainObjPtr vm, * qemuMonitorOpen: * @vm: domain object * @config: monitor configuration - * @json: enable JSON on the monitor * @timeout: number of seconds to add to default timeout * @cb: monitor event handles * @opaque: opaque data for @cb @@ -909,7 +906,6 @@ qemuMonitorOpenInternal(virDomainObjPtr vm, qemuMonitorPtr qemuMonitorOpen(virDomainObjPtr vm, virDomainChrSourceDefPtr config, - bool json, bool retry, unsigned long long timeout, qemuMonitorCallbacksPtr cb, @@ -941,7 +937,7 @@ qemuMonitorOpen(virDomainObjPtr vm, return NULL; } - ret = qemuMonitorOpenInternal(vm, fd, hasSendFD, json, cb, opaque); + ret = qemuMonitorOpenInternal(vm, fd, hasSendFD, cb, opaque); if (!ret) VIR_FORCE_CLOSE(fd); return ret; @@ -951,11 +947,10 @@ qemuMonitorOpen(virDomainObjPtr vm, qemuMonitorPtr qemuMonitorOpenFD(virDomainObjPtr vm, int sockfd, - bool json, qemuMonitorCallbacksPtr cb, void *opaque) { - return qemuMonitorOpenInternal(vm, sockfd, true, json, cb, opaque); + return qemuMonitorOpenInternal(vm, sockfd, true, cb, opaque); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index a19d6069c6..cab13c9e6e 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -340,7 +340,6 @@ char *qemuMonitorUnescapeArg(const char *in); qemuMonitorPtr qemuMonitorOpen(virDomainObjPtr vm, virDomainChrSourceDefPtr config, - bool json, bool retry, unsigned long long timeout, qemuMonitorCallbacksPtr cb, @@ -348,7 +347,6 @@ qemuMonitorPtr qemuMonitorOpen(virDomainObjPtr vm, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6); qemuMonitorPtr qemuMonitorOpenFD(virDomainObjPtr vm, int sockfd, - bool json, qemuMonitorCallbacksPtr cb, void *opaque) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index def60596b0..cf0566a517 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1895,7 +1895,6 @@ qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob, mon = qemuMonitorOpen(vm, monConfig, - true, retry, timeout, &monitorCallbacks, @@ -8447,7 +8446,7 @@ qemuProcessQMPConnectMonitor(qemuProcessQMPPtr proc) proc->vm->pid = proc->pid; - if (!(proc->mon = qemuMonitorOpen(proc->vm, &monConfig, true, true, + if (!(proc->mon = qemuMonitorOpen(proc->vm, &monConfig, true, 0, &callbacks, NULL))) goto cleanup; diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 8d7c503c6e..e8bcd892ad 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -1263,7 +1263,6 @@ qemuMonitorTestNew(bool json, test->qapischema = schema; if (!(test->mon = qemuMonitorOpen(test->vm, &src, - json, true, 0, &qemuMonitorTestCallbacks, -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list