From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Fam Zheng <famz@redhat.com>,
Marcel Apfelbaum <marcel.a@redhat.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
Gabriel Somlo <somlo@cmu.edu>,
Anthony Liguori <aliguori@amazon.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Laszlo Ersek <lersek@redhat.com>
Subject: [Qemu-devel] [PULL 3/8] bios-tables-test: fix ASL normalization false positive
Date: Tue, 29 Jul 2014 12:48:34 +0200 [thread overview]
Message-ID: <1406630860-13530-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1406630860-13530-1-git-send-email-mst@redhat.com>
From: Paolo Bonzini <pbonzini@redhat.com>
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 <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
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
next prev parent reply other threads:[~2014-07-29 10:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 10:48 [Qemu-devel] [PULL 0/8] pc migration fixes Michael S. Tsirkin
2014-07-29 10:48 ` [Qemu-devel] [PULL 1/8] acpi-dsdt: procedurally generate _PRT Michael S. Tsirkin
2014-07-29 10:48 ` [Qemu-devel] [PULL 2/8] pc: hack for migration compatibility from QEMU 2.0 Michael S. Tsirkin
2014-07-29 10:48 ` Michael S. Tsirkin [this message]
2014-07-29 10:48 ` [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 10:48 ` [Qemu-devel] [PULL 5/8] acpi-build: minor code cleanup Michael S. Tsirkin
2014-07-29 10:48 ` [Qemu-devel] [PULL 6/8] pc: future-proof migration-compatibility of ACPI tables Michael S. Tsirkin
2014-07-29 10:48 ` [Qemu-devel] [PULL 7/8] acpi-build: tweak acpi migration limits Michael S. Tsirkin
2014-07-29 10:48 ` [Qemu-devel] [PULL 8/8] piix: set legacy table size for 1.7 Michael S. Tsirkin
2014-07-29 12:20 ` [Qemu-devel] [PULL 0/8] pc migration fixes Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406630860-13530-4-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=aik@ozlabs.ru \
--cc=aliguori@amazon.com \
--cc=famz@redhat.com \
--cc=lersek@redhat.com \
--cc=marcel.a@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=somlo@cmu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).