From 8b934a5cb6357b4558c186bd715c59baf3ce4bd2 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Tue, 16 Apr 2013 07:05:21 -0400 Subject: [PATCH] Check for unsupported QMP command 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(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 75008749b1..6fdd650d88 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4774,8 +4774,12 @@ qemuMonitorJSONGetStringArray(qemuMonitorPtr mon, const char *qmpCmd, 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; -- GitLab