Check for an unsupported QMP command when using the query-tpm-models and query-tpm-types commands before checking for general errors in order to avoid error messages in the log. Signed-off-by: Stefan Berger --- src/qemu/qemu_monitor_json.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Index: libvirt/src/qemu/qemu_monitor_json.c =================================================================== --- libvirt.orig/src/qemu/qemu_monitor_json.c +++ libvirt/src/qemu/qemu_monitor_json.c @@ -4774,8 +4774,12 @@ qemuMonitorJSONGetStringArray(qemuMonito ret = qemuMonitorJSONCommand(mon, cmd, &reply); - if (ret == 0) + if (ret == 0) { + if (qemuMonitorJSONHasError(reply, "CommandNotFound")) + goto cleanup; + ret = qemuMonitorJSONCheckError(cmd, reply); + } if (ret < 0) goto cleanup;