FreeBSD/sys/contrib/dev/acpica/components/debugger/dbnames.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbFindNameInNamespace
 *
 * PARAMETERS:  NameArg         - The 4-character ACPI name to find.
 *                                wildcards are supported.
 *
 * RETURN:      None
 *
 * DESCRIPTION: Search the namespace for a given name (with wildcards)
 *
 ******************************************************************************/
AcpiDbFindNameInNamespace
PARAMETERS:  NameArg         - The 4-character ACPI name to find.
wildcards are supported.

None

Search the namespace for a given name (with wildcards)
AcpiDbFindNameInNamespace PARAMETERS : NameArg - The 4 - character ACPI name to find . wildcards are supported . None Search the namespace for a given name ( with wildcards )
ACPI_STATUS
AcpiDbFindNameInNamespace (
    char                    *NameArg)
{
    char                    AcpiName[5] = "____";
    char                    *AcpiNamePtr = AcpiName;
    if (strlen (NameArg) > ACPI_NAME_SIZE)
    {
        AcpiOsPrintf ("Name must be no longer than 4 characters\n");
        return (AE_OK);
    }
    AcpiUtStrupr (NameArg);
    while (*NameArg)
    {
        *AcpiNamePtr = *NameArg;
        AcpiNamePtr++;
        NameArg++;
    }
    (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
        ACPI_UINT32_MAX, AcpiDbWalkAndMatchName, NULL, AcpiName, NULL);
    AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
    return (AE_OK);
}
ACPI_STATUS AcpiDbFindNameInNamespace ( char * NameArg ) { char AcpiName [ 5 ] = " " ; char * AcpiNamePtr = AcpiName ; if ( strlen ( NameArg ) > ACPI_NAME_SIZE ) { AcpiOsPrintf ( " \n " ) ; return ( AE_OK ) ; } AcpiUtStrupr ( NameArg ) ; while ( * NameArg ) { * AcpiNamePtr = * NameArg ; AcpiNamePtr ++ ; NameArg ++ ; } ( void ) AcpiWalkNamespace ( ACPI_TYPE_ANY , ACPI_ROOT_OBJECT , ACPI_UINT32_MAX , AcpiDbWalkAndMatchName , NULL , AcpiName , NULL ) ; AcpiDbSetOutputDestination ( ACPI_DB_CONSOLE_OUTPUT ) ; return ( AE_OK ) ; }
FUNCTION:    AcpiDbFindNameInNamespace
 PARAMETERS:  NameArg         - The 4-character ACPI name to find.
FUNCTION : AcpiDbFindNameInNamespace PARAMETERS : NameArg - The 4 - character ACPI name to find .
/* Pad out name with underscores as necessary to create a 4-char name */ /* Walk the namespace from the root */