From 24fd86c118307410632cf2bcb7ae2e224695eea7 Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Wed, 19 Feb 2014 13:02:22 -0800 Subject: AcpiDump: Comment update and some cleanup, no functional change. Maintenance cleanup. --- source/tools/acpidump/apdump.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/tools/acpidump/apdump.c b/source/tools/acpidump/apdump.c index cf66a408a..1e05b2e30 100644 --- a/source/tools/acpidump/apdump.c +++ b/source/tools/acpidump/apdump.c @@ -141,6 +141,7 @@ BOOLEAN ApIsValidHeader ( ACPI_TABLE_HEADER *Table) { + if (!ACPI_VALIDATE_RSDP_SIG (Table->Signature)) { /* Make sure signature is all ASCII and a valid ACPI name */ @@ -172,9 +173,9 @@ ApIsValidHeader ( * * PARAMETERS: Table - Pointer to table to be validated * - * RETURN: TRUE if the checksum appears to be valid. FALSE otherwise + * RETURN: TRUE if the checksum appears to be valid. FALSE otherwise. * - * DESCRIPTION: Check for a valid ACPI table checksum + * DESCRIPTION: Check for a valid ACPI table checksum. * ******************************************************************************/ @@ -192,7 +193,6 @@ ApIsValidChecksum ( * Checksum for RSDP. * Note: Other checksums are computed during the table dump. */ - Rsdp = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Table); Status = AcpiTbValidateRsdp (Rsdp); } @@ -203,7 +203,7 @@ ApIsValidChecksum ( if (ACPI_FAILURE (Status)) { - fprintf (stderr, "%4.4s: Warning: wrong checksum\n", + fprintf (stderr, "%4.4s: Warning: wrong checksum in table\n", Table->Signature); } @@ -219,7 +219,7 @@ ApIsValidChecksum ( * * RETURN: Table length * - * DESCRIPTION: Obtain table length according to table signature + * DESCRIPTION: Obtain table length according to table signature. * ******************************************************************************/ @@ -242,10 +242,10 @@ ApGetTableLength ( Rsdp = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Table); return (Rsdp->Length); } - else - { - return (Table->Length); - } + + /* Normal ACPI table */ + + return (Table->Length); } @@ -291,7 +291,7 @@ ApDumpTableBuffer ( } /* - * Dump the table with header for use with acpixtract utility + * Dump the table with header for use with acpixtract utility. * Note: simplest to just always emit a 64-bit address. AcpiXtract * utility can handle this. */ @@ -326,8 +326,8 @@ ApDumpAllTables ( UINT32 Instance = 0; ACPI_PHYSICAL_ADDRESS Address; ACPI_STATUS Status; - UINT32 i; int TableStatus; + UINT32 i; /* Get and dump all available ACPI tables */ -- cgit v1.2.3