mirror of
https://github.com/acpica/acpica/
synced 2025-01-13 12:59:18 +03:00
AcpiXtract: Fix to handle embedded comments/msgs from acpidump
Apparently some or all versions of acpidump will occasionally drop a comment like "Wrong checksum", etc., into the dump file. This was causing problems for AcpiXtract. ACPICA BZ 905.
This commit is contained in:
parent
c846f9b22f
commit
baab09e685
@ -122,11 +122,11 @@
|
||||
|
||||
/* Note: This is a 32-bit program only */
|
||||
|
||||
#define VERSION 0x20100107
|
||||
#define VERSION 0x20110225
|
||||
#define FIND_HEADER 0
|
||||
#define EXTRACT_DATA 1
|
||||
#define BUFFER_SIZE 256
|
||||
|
||||
#define HEADER_LINE_LENGTH 17 /* strlen ("FACP @ 0x737e1000") */
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
@ -577,6 +577,13 @@ ExtractTables (
|
||||
{
|
||||
case FIND_HEADER:
|
||||
|
||||
/* Ignore lines that are too short to be header lines */
|
||||
|
||||
if (strlen (Buffer) < HEADER_LINE_LENGTH)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignore empty lines and lines that start with a space */
|
||||
|
||||
if ((Buffer[0] == ' ') ||
|
||||
@ -585,6 +592,15 @@ ExtractTables (
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignore lines that are not of the form "ABCD @ " */
|
||||
|
||||
if ((Buffer[4] != ' ') ||
|
||||
(Buffer[5] != '@') ||
|
||||
(Buffer[6] != ' '))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
NormalizeSignature (Buffer);
|
||||
strncpy (ThisSignature, Buffer, 4);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user