FreeBSD/sys/contrib/dev/acpica/components/debugger/dbnames.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbDumpNamespace
 *
 * PARAMETERS:  StartArg        - Node to begin namespace dump
 *              DepthArg        - Maximum tree depth to be dumped
 *
 * RETURN:      None
 *
 * DESCRIPTION: Dump entire namespace or a subtree. Each node is displayed
 *              with type and other information.
 *
 ******************************************************************************/
AcpiDbDumpNamespace
PARAMETERS:  StartArg        - Node to begin namespace dump
DepthArg        - Maximum tree depth to be dumped

None

Dump entire namespace or a subtree. Each node is displayed
with type and other information.
AcpiDbDumpNamespace PARAMETERS : StartArg - Node to begin namespace dump DepthArg - Maximum tree depth to be dumped None Dump entire namespace or a subtree . Each node is displayed with type and other information .
void
AcpiDbDumpNamespace (
    char                    *StartArg,
    char                    *DepthArg)
{
    ACPI_HANDLE             SubtreeEntry = AcpiGbl_RootNode;
    UINT32                  MaxDepth = ACPI_UINT32_MAX;
    if (StartArg)
    {
        SubtreeEntry = AcpiDbConvertToNode (StartArg);
        if (!SubtreeEntry)
        {
            return;
        }
        if (DepthArg)
        {
            MaxDepth = strtoul (DepthArg, NULL, 0);
        }
    }
    AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT);
    AcpiOsPrintf ("ACPI Namespace (from %4.4s (%p) subtree):\n",
        ((ACPI_NAMESPACE_NODE *) SubtreeEntry)->Name.Ascii, SubtreeEntry);
    AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
    AcpiNsDumpObjects (ACPI_TYPE_ANY, ACPI_DISPLAY_SUMMARY, MaxDepth,
        ACPI_OWNER_ID_MAX, SubtreeEntry);
    AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
}
void AcpiDbDumpNamespace ( char * StartArg , char * DepthArg ) { ACPI_HANDLE SubtreeEntry = AcpiGbl_RootNode ; UINT32 MaxDepth = ACPI_UINT32_MAX ; if ( StartArg ) { SubtreeEntry = AcpiDbConvertToNode ( StartArg ) ; if ( ! SubtreeEntry ) { return ; } if ( DepthArg ) { MaxDepth = strtoul ( DepthArg , NULL , 0 ) ; } } AcpiDbSetOutputDestination ( ACPI_DB_DUPLICATE_OUTPUT ) ; AcpiOsPrintf ( " \n " , ( ( ACPI_NAMESPACE_NODE * ) SubtreeEntry ) -> Name . Ascii , SubtreeEntry ) ; AcpiDbSetOutputDestination ( ACPI_DB_REDIRECTABLE_OUTPUT ) ; AcpiNsDumpObjects ( ACPI_TYPE_ANY , ACPI_DISPLAY_SUMMARY , MaxDepth , ACPI_OWNER_ID_MAX , SubtreeEntry ) ; AcpiDbSetOutputDestination ( ACPI_DB_CONSOLE_OUTPUT ) ; }
FUNCTION:    AcpiDbDumpNamespace
 PARAMETERS:  StartArg        - Node to begin namespace dump
              DepthArg        - Maximum tree depth to be dumped
FUNCTION : AcpiDbDumpNamespace PARAMETERS : StartArg - Node to begin namespace dump DepthArg - Maximum tree depth to be dumped
/* No argument given, just start at the root and dump entire namespace */ /* Now we can check for the depth argument */ /* Display the subtree */