diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2016-04-25 22:24:53 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2016-04-25 22:24:53 +0000 |
commit | 2331c681155dd7b2f78bd28ca0c183e2f98ff44f (patch) | |
tree | 299b4e7602e20d34772a23e4bdda2512f5f1706b /source/tools/acpixtract | |
parent | 937fa60dd2f2b6264fb99f22b638190a3fef996b (diff) |
Notes
Diffstat (limited to 'source/tools/acpixtract')
-rw-r--r-- | source/tools/acpixtract/acpixtract.c | 6 | ||||
-rw-r--r-- | source/tools/acpixtract/acpixtract.h | 4 | ||||
-rw-r--r-- | source/tools/acpixtract/axutils.c | 75 |
3 files changed, 3 insertions, 82 deletions
diff --git a/source/tools/acpixtract/acpixtract.c b/source/tools/acpixtract/acpixtract.c index e0d17556f709..1573ceeff065 100644 --- a/source/tools/acpixtract/acpixtract.c +++ b/source/tools/acpixtract/acpixtract.c @@ -239,7 +239,7 @@ CleanupAndExit: if (Gbl_TableCount > 1) { - printf ("\n%d binary ACPI tables extracted\n", + printf ("\n%u binary ACPI tables extracted\n", Gbl_TableCount); } @@ -383,7 +383,7 @@ CleanupAndExit: ThisSignature, ThisTableBytesWritten, Gbl_OutputFilename); } - printf ("\n%d binary ACPI tables extracted and written to %s (%u bytes)\n", + printf ("\n%u binary ACPI tables extracted and written to %s (%u bytes)\n", Gbl_TableCount, Gbl_OutputFilename, TotalBytesWritten); fclose (InputFile); @@ -471,7 +471,7 @@ AxListTables ( continue; } - if (!AcpiIsValidSignature (TableHeader->Signature)) + if (!AcpiUtValidNameseg (TableHeader->Signature)) { continue; } diff --git a/source/tools/acpixtract/acpixtract.h b/source/tools/acpixtract/acpixtract.h index c280102cae69..14df786a4186 100644 --- a/source/tools/acpixtract/acpixtract.h +++ b/source/tools/acpixtract/acpixtract.h @@ -148,10 +148,6 @@ void AxNormalizeSignature ( char *Signature); -BOOLEAN -AcpiIsValidSignature ( - char *Signature); - void AxCheckAscii ( char *Name, diff --git a/source/tools/acpixtract/axutils.c b/source/tools/acpixtract/axutils.c index 6d1d0d88346c..6af8cdc29a3c 100644 --- a/source/tools/acpixtract/axutils.c +++ b/source/tools/acpixtract/axutils.c @@ -46,81 +46,6 @@ /******************************************************************************* * - * FUNCTION: AcpiIsValidSignature - * - * PARAMETERS: Signature - Sig string to be validated - * - * RETURN: TRUE if signature is has 4 valid ACPI characters - * - * DESCRIPTION: Validate an ACPI table signature. - * - ******************************************************************************/ - -BOOLEAN -AcpiIsValidSignature ( - char *Signature) -{ - UINT32 i; - - - /* Validate each character in the signature */ - - for (i = 0; i < ACPI_NAME_SIZE; i++) - { - if (!AcpiUtValidAcpiChar (Signature[i], i)) - { - return (FALSE); - } - } - - return (TRUE); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiUtValidAcpiChar - * - * PARAMETERS: Char - The character to be examined - * Position - Byte position (0-3) - * - * RETURN: TRUE if the character is valid, FALSE otherwise - * - * DESCRIPTION: Check for a valid ACPI character. Must be one of: - * 1) Upper case alpha - * 2) numeric - * 3) underscore - * - * We allow a '!' as the last character because of the ASF! table - * - ******************************************************************************/ - -BOOLEAN -AcpiUtValidAcpiChar ( - char Character, - UINT32 Position) -{ - - if (!((Character >= 'A' && Character <= 'Z') || - (Character >= '0' && Character <= '9') || - (Character == '_'))) - { - /* Allow a '!' in the last position */ - - if (Character == '!' && Position == 3) - { - return (TRUE); - } - - return (FALSE); - } - - return (TRUE); -} - - -/******************************************************************************* - * * FUNCTION: AxCheckAscii * * PARAMETERS: Name - Ascii string, at least as long as Count |