Macro rename and cleanup

date	2001.11.21.17.06.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 18:19:45 +00:00
parent 051295c847
commit 5a3a6cc693
2 changed files with 60 additions and 14 deletions

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsalloc - Namespace allocation and deletion utilities
* $Revision: 1.62 $
* $Revision: 1.63 $
*
******************************************************************************/
@ -156,9 +156,9 @@ AcpiNsCreateNode (
ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalAllocated++);
Node->DataType = ACPI_DESC_TYPE_NAMED;
Node->Name = Name;
Node->ReferenceCount = 1;
ACPI_SET_DESCRIPTOR_TYPE (Node, ACPI_DESC_TYPE_NAMED);
return_PTR (Node);
}

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
* $Revision: 1.114 $
* $Revision: 1.117 $
*
*****************************************************************************/
@ -129,6 +129,46 @@
#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/*******************************************************************************
*
* FUNCTION: AcpiNsPrintPathname
*
* PARAMETERS: NumSegment - Number of ACPI name segments
* Pathname - The compressed (internal) path
*
* DESCRIPTION: Print an object's full namespace pathname
*
******************************************************************************/
void
AcpiNsPrintPathname (
UINT32 NumSegments,
char *Pathname)
{
UINT32 i;
PROC_NAME ("AcpiNsPrintPathname");
if (!(AcpiDbgLevel & ACPI_LV_NAMES) || !(AcpiDbgLayer & ACPI_NAMESPACE))
{
return;
}
/* Print the entire name */
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "["));
for (i = 0; i < NumSegments; i++)
{
AcpiOsPrintf ("%4.4s.", (char *) &Pathname[i * 4]);
}
AcpiOsPrintf ("]\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiNsDumpPathname
@ -408,7 +448,8 @@ AcpiNsDumpOneObject (
break;
case ACPI_TYPE_BUFFER_FIELD:
if (ObjDesc->BufferField.BufferObj)
if (ObjDesc->BufferField.BufferObj &&
ObjDesc->BufferField.BufferObj->Buffer.Node)
{
AcpiOsPrintf (" Buf [%4.4s]",
(char *) &ObjDesc->BufferField.BufferObj->Buffer.Node->Name);
@ -530,19 +571,21 @@ AcpiNsDumpOneObject (
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)
@ -556,18 +599,21 @@ AcpiNsDumpOneObject (
ObjType, AcpiUtGetTypeName (ObjType));
BytesToDump = sizeof (ACPI_OPERAND_OBJECT);
}
}
else
{
break;
default:
AcpiOsPrintf ("(String or Buffer - not 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;
}