From 15ee3c2511157a7dfd3516e633057ce26b9fbd62 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 17 Sep 2014 14:43:12 -0400 Subject: [PATCH] qemu: Don't fail startup/attach for IOThreads if no JSON If the qemu being used doesn't support JSON, then querying for IOThread data would fail. In that case, ensure the *iothreads is NULL and return 0 as the count of iothreads available. --- src/qemu/qemu_monitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 8927dbbab7..10f51c5c3a 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4112,10 +4112,10 @@ qemuMonitorGetIOThreads(qemuMonitorPtr mon, return -1; } + /* Requires JSON to make the query */ if (!mon->json) { - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("JSON monitor is required")); - return -1; + *iothreads = NULL; + return 0; } return qemuMonitorJSONGetIOThreads(mon, iothreads); -- 2.47.2