提交 cb348985 编写于 作者: P Paolo Bonzini 提交者: Michael S. Tsirkin

bios-tables-test: fix ASL normalization false positive

My version of IASL (from RHEL7) puts two newlines between the head comment
and the DefinitionBlock property.  Kill all newlines after the comment,
so that normalize_asl works properly.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
上级 07fb6176
......@@ -487,7 +487,11 @@ static GString *normalize_asl(gchar *asl_code)
/* strip comments (different generation days) */
comment = g_strstr_len(asl->str, asl->len, COMMENT_END);
if (comment) {
asl = g_string_erase(asl, 0, comment + sizeof(COMMENT_END) - asl->str);
comment += strlen(COMMENT_END);
while (*comment == '\n') {
comment++;
}
asl = g_string_erase(asl, 0, comment - asl->str);
}
/* strip def block name (it has file path in it) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册