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 <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2013-04-16 07:05:21 -04:00 committed by Stefan Berger
parent f62cb55666
commit 8b934a5cb6

View File

@ -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;