diff options
Diffstat (limited to 'sys/contrib/dev/acpica/dbutils.c')
-rw-r--r-- | sys/contrib/dev/acpica/dbutils.c | 59 |
1 files changed, 53 insertions, 6 deletions
diff --git a/sys/contrib/dev/acpica/dbutils.c b/sys/contrib/dev/acpica/dbutils.c index cd4f435..3fa3eb0 100644 --- a/sys/contrib/dev/acpica/dbutils.c +++ b/sys/contrib/dev/acpica/dbutils.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbutils - AML debugger utilities - * $Revision: 57 $ + * $Revision: 61 $ * ******************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -131,6 +131,46 @@ /******************************************************************************* * + * FUNCTION: AcpiDbMatchArgument + * + * PARAMETERS: UserArgument - User command line + * Arguments - Array of commands to match against + * + * RETURN: Index into command array or ACPI_TYPE_NOT_FOUND if not found + * + * DESCRIPTION: Search command array for a command match + * + ******************************************************************************/ + +ACPI_OBJECT_TYPE +AcpiDbMatchArgument ( + char *UserArgument, + ARGUMENT_INFO *Arguments) +{ + UINT32 i; + + + if (!UserArgument || UserArgument[0] == 0) + { + return (ACPI_TYPE_NOT_FOUND); + } + + for (i = 0; Arguments[i].Name; i++) + { + if (ACPI_STRSTR (Arguments[i].Name, UserArgument) == Arguments[i].Name) + { + return (i); + } + } + + /* Argument not recognized */ + + return (ACPI_TYPE_NOT_FOUND); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDbSetOutputDestination * * PARAMETERS: OutputFlags - Current flags word @@ -246,7 +286,14 @@ AcpiDbDumpObject ( case ACPI_TYPE_BUFFER: AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length); - AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT); + if (ObjDesc->Buffer.Length) + { + AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT); + } + else + { + AcpiOsPrintf ("\n"); + } break; @@ -301,7 +348,7 @@ AcpiDbDumpObject ( void AcpiDbPrepNamestring ( - NATIVE_CHAR *Name) + char *Name) { @@ -452,9 +499,9 @@ AcpiDbSecondPassParse ( ACPI_NAMESPACE_NODE * AcpiDbLocalNsLookup ( - NATIVE_CHAR *Name) + char *Name) { - NATIVE_CHAR *InternalPath; + char *InternalPath; ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node = NULL; |