提交 7ccc4d52 编写于 作者: D Daniel P. Berrange

Fix regression starting QEMU instances without query-events

If QEMU reports CommandNotFound for the 'query-events' command,
we must treat that as success, returning a zero-length array
of events
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 416eca18
......@@ -4105,8 +4105,13 @@ int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
ret = qemuMonitorJSONCommand(mon, cmd, &reply);
if (ret == 0)
if (ret == 0) {
if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
ret = 0;
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.
先完成此消息的编辑!
想要评论请 注册