From 53dd1dad7d677dac006404d4d1463d2a116613dc Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 18:23:03 +0000 Subject: [PATCH] Fixed pathname dump code date 2001.11.30.22.21.00; author rmoore1; state Exp; --- source/components/namespace/nsdump.c | 49 +++++++++++++++++++--------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c index 81d2531ca..611a8a738 100644 --- a/source/components/namespace/nsdump.c +++ b/source/components/namespace/nsdump.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: nsdump - table dumping routines for debug - * $Revision: 1.116 $ + * $Revision: 1.118 $ * *****************************************************************************/ @@ -146,8 +146,6 @@ AcpiNsPrintPathname ( UINT32 NumSegments, char *Pathname) { - UINT32 i; - PROC_NAME ("AcpiNsPrintPathname"); @@ -160,9 +158,16 @@ AcpiNsPrintPathname ( ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[")); - for (i = 0; i < NumSegments; i++) + while (NumSegments) { - AcpiOsPrintf ("%4.4s.", (char *) &Pathname[i * 4]); + AcpiOsPrintf ("%4.4s", Pathname); + Pathname += ACPI_NAME_SIZE; + + NumSegments--; + if (NumSegments) + { + AcpiOsPrintf ("."); + } } AcpiOsPrintf ("]\n"); @@ -254,6 +259,7 @@ AcpiNsDumpOneObject ( UINT32 LevelTmp; UINT32 WhichBit; UINT32 i; + UINT32 DbgLevel; PROC_NAME ("NsDumpOneObject"); @@ -355,7 +361,10 @@ AcpiNsDumpOneObject ( AcpiOsPrintf (" %4.4s %-12s %p", (char *) &ThisNode->Name, AcpiUtGetTypeName (Type), ThisNode); + DbgLevel = AcpiDbgLevel; + AcpiDbgLevel = 0; ObjDesc = AcpiNsGetAttachedObject (ThisNode); + AcpiDbgLevel = DbgLevel; switch (Info->DisplayType) { @@ -564,26 +573,31 @@ AcpiNsDumpOneObject ( /* If there is an attached object, display it */ + DbgLevel = AcpiDbgLevel; + AcpiDbgLevel = 0; ObjDesc = AcpiNsGetAttachedObject (ThisNode); + AcpiDbgLevel = DbgLevel; /* Dump attached objects */ while (ObjDesc) { ObjType = INTERNAL_TYPE_INVALID; + AcpiOsPrintf (" Attached Object %p: ", ObjDesc); /* Decode the type of attached object and dump the contents */ - AcpiOsPrintf (" Attached Object %p: ", ObjDesc); - - if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_NAMED)) + switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc)) { + case ACPI_DESC_TYPE_NAMED: + AcpiOsPrintf ("(Ptr to Node)\n"); BytesToDump = sizeof (ACPI_NAMESPACE_NODE); - } + break; + + + case ACPI_DESC_TYPE_INTERNAL: - else if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL)) - { ObjType = ObjDesc->Common.Type; if (ObjType > INTERNAL_TYPE_MAX) @@ -597,18 +611,21 @@ AcpiNsDumpOneObject ( ObjType, AcpiUtGetTypeName (ObjType)); BytesToDump = sizeof (ACPI_OPERAND_OBJECT); } - } - else - { - AcpiOsPrintf ("(String or Buffer - not descriptor)\n"); + break; + + + default: + + AcpiOsPrintf ("(String or Buffer ptr - not an object descriptor)\n"); BytesToDump = 16; + break; } DUMP_BUFFER (ObjDesc, BytesToDump); /* If value is NOT an internal object, we are done */ - if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_NAMED)) + if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_INTERNAL) { goto Cleanup; }