提交 7e0cd26d 编写于 作者: J Jiri Denemark

qemu: Properly skip "char device redirected to" in QEMU log

When reading QEMU log for reporting it as an error message, we want to
skip "char device redirected to" line. However, this string is not
printed at the beginning of a line, which means STRPREFIX will never
find it.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 1fd1b766
......@@ -1847,7 +1847,7 @@ qemuProcessReadLog(qemuDomainLogContextPtr logCtxt, char **msg)
while ((eol = strchr(filter_next, '\n'))) {
*eol = '\0';
if (virLogProbablyLogMessage(filter_next) ||
STRPREFIX(filter_next, "char device redirected to")) {
strstr(filter_next, "char device redirected to")) {
size_t skip = (eol + 1) - filter_next;
memmove(filter_next, eol + 1, buf + got - eol);
got -= skip;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册