[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization fal
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] bios-tables-test: fix ASL normalization false positive |
Date: |
Tue, 29 Jul 2014 11:28:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/28/14 17:34, Paolo Bonzini wrote:
> 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: Paolo Bonzini <address@hidden>
> ---
> tests/bios-tables-test.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 62771f7..045eb27 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -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) */
>
Reviewed-by: Laszlo Ersek <address@hidden>
Re: [Qemu-devel] [PATCH v4 0/5] ACPI fixes for QEMU 2.1, Markus Armbruster, 2014/07/29