[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/8] bios-tables-test: fix ASL normalization false po
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 3/8] bios-tables-test: fix ASL normalization false positive |
Date: |
Tue, 29 Jul 2014 12:48:34 +0200 |
From: Paolo Bonzini <address@hidden>
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>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laszlo Ersek <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) */
--
MST
- [Qemu-devel] [PULL 0/8] pc migration fixes, Michael S. Tsirkin, 2014/07/29
- [Qemu-devel] [PULL 1/8] acpi-dsdt: procedurally generate _PRT, Michael S. Tsirkin, 2014/07/29
- [Qemu-devel] [PULL 2/8] pc: hack for migration compatibility from QEMU 2.0, Michael S. Tsirkin, 2014/07/29
- [Qemu-devel] [PULL 3/8] bios-tables-test: fix ASL normalization false positive,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 4/8] pc: acpi: generate AML only for PCI0 devices if PCI bridge hotplug is disabled, Michael S. Tsirkin, 2014/07/29
- [Qemu-devel] [PULL 5/8] acpi-build: minor code cleanup, Michael S. Tsirkin, 2014/07/29
- [Qemu-devel] [PULL 6/8] pc: future-proof migration-compatibility of ACPI tables, Michael S. Tsirkin, 2014/07/29
- [Qemu-devel] [PULL 7/8] acpi-build: tweak acpi migration limits, Michael S. Tsirkin, 2014/07/29
- [Qemu-devel] [PULL 8/8] piix: set legacy table size for 1.7, Michael S. Tsirkin, 2014/07/29
- Re: [Qemu-devel] [PULL 0/8] pc migration fixes, Peter Maydell, 2014/07/29