diff options
Diffstat (limited to 'sys/contrib/dev/acpica/nsutils.c')
-rw-r--r-- | sys/contrib/dev/acpica/nsutils.c | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/nsutils.c b/sys/contrib/dev/acpica/nsutils.c index a786de7..6e87aba 100644 --- a/sys/contrib/dev/acpica/nsutils.c +++ b/sys/contrib/dev/acpica/nsutils.c @@ -2,7 +2,7 @@ * * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing * parents and siblings and Scope manipulation - * $Revision: 112 $ + * $Revision: 113 $ * *****************************************************************************/ @@ -128,6 +128,57 @@ /******************************************************************************* * + * FUNCTION: AcpiNsReportError + * + * PARAMETERS: ModuleName - Caller's module name (for error output) + * LineNumber - Caller's line number (for error output) + * ComponentId - Caller's component ID (for error output) + * Message - Error message to use on failure + * + * RETURN: None + * + * DESCRIPTION: Print warning message + * + ******************************************************************************/ + +void +AcpiNsReportError ( + NATIVE_CHAR *ModuleName, + UINT32 LineNumber, + UINT32 ComponentId, + char *InternalName, + ACPI_STATUS LookupStatus) +{ + ACPI_STATUS Status; + char *Name; + + + Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, InternalName, NULL, &Name); + + AcpiOsPrintf ("%8s-%04d: *** Error: Looking up ", + ModuleName, LineNumber); + + if (Name) + { + AcpiOsPrintf ("[%s]", Name); + } + else + { + AcpiOsPrintf ("[COULD NOT EXTERNALIZE NAME]"); + } + + AcpiOsPrintf (" in namespace, %s\n", + AcpiFormatException (LookupStatus)); + + if (Name) + { + ACPI_MEM_FREE (Name); + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiNsValidRootPrefix * * PARAMETERS: Prefix - Character to be checked |