提交 8b934a5c 编写于 作者: S Stefan Berger 提交者: Stefan Berger

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: NStefan Berger <stefanb@linux.vnet.ibm.com>
上级 f62cb556
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册