diff options
Diffstat (limited to 'sys/contrib/dev/acpica/components/namespace/nsdump.c')
-rw-r--r-- | sys/contrib/dev/acpica/components/namespace/nsdump.c | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/sys/contrib/dev/acpica/components/namespace/nsdump.c b/sys/contrib/dev/acpica/components/namespace/nsdump.c index 77fb279..d34ff11 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsdump.c +++ b/sys/contrib/dev/acpica/components/namespace/nsdump.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,7 +99,7 @@ AcpiNsGetMaxDepth ( void AcpiNsPrintPathname ( UINT32 NumSegments, - char *Pathname) + const char *Pathname) { UINT32 i; @@ -122,7 +122,7 @@ AcpiNsPrintPathname ( { for (i = 0; i < 4; i++) { - ACPI_IS_PRINT (Pathname[i]) ? + isprint ((int) Pathname[i]) ? AcpiOsPrintf ("%c", Pathname[i]) : AcpiOsPrintf ("?"); } @@ -139,6 +139,9 @@ AcpiNsPrintPathname ( } +#ifdef ACPI_OBSOLETE_FUNCTIONS +/* Not used at this time, perhaps later */ + /******************************************************************************* * * FUNCTION: AcpiNsDumpPathname @@ -158,7 +161,7 @@ AcpiNsPrintPathname ( void AcpiNsDumpPathname ( ACPI_HANDLE Handle, - char *Msg, + const char *Msg, UINT32 Level, UINT32 Component) { @@ -179,7 +182,7 @@ AcpiNsDumpPathname ( AcpiOsPrintf ("\n"); return_VOID; } - +#endif /******************************************************************************* * @@ -258,7 +261,8 @@ AcpiNsDumpOneObject ( if (Type > ACPI_TYPE_LOCAL_MAX) { - ACPI_WARNING ((AE_INFO, "Invalid ACPI Object Type 0x%08X", Type)); + ACPI_WARNING ((AE_INFO, + "Invalid ACPI Object Type 0x%08X", Type)); } AcpiOsPrintf ("%4.4s", AcpiUtGetNodeName (ThisNode)); @@ -267,7 +271,7 @@ AcpiNsDumpOneObject ( /* Now we can print out the pertinent information */ AcpiOsPrintf (" %-12s %p %2.2X ", - AcpiUtGetTypeName (Type), ThisNode, ThisNode->OwnerId); + AcpiUtGetTypeName (Type), ThisNode, ThisNode->OwnerId); DbgLevel = AcpiDbgLevel; AcpiDbgLevel = 0; @@ -354,7 +358,7 @@ AcpiNsDumpOneObject ( if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID) { AcpiOsPrintf ("Len %.2X", - ObjDesc->Buffer.Length); + ObjDesc->Buffer.Length); /* Dump some of the buffer */ @@ -377,7 +381,7 @@ AcpiNsDumpOneObject ( case ACPI_TYPE_STRING: AcpiOsPrintf ("Len %.2X ", ObjDesc->String.Length); - AcpiUtPrintString (ObjDesc->String.Pointer, 32); + AcpiUtPrintString (ObjDesc->String.Pointer, 80); AcpiOsPrintf ("\n"); break; @@ -535,9 +539,9 @@ AcpiNsDumpOneObject ( /* If there is an attached object, display it */ - DbgLevel = AcpiDbgLevel; + DbgLevel = AcpiDbgLevel; AcpiDbgLevel = 0; - ObjDesc = AcpiNsGetAttachedObject (ThisNode); + ObjDesc = AcpiNsGetAttachedObject (ThisNode); AcpiDbgLevel = DbgLevel; /* Dump attached objects */ @@ -564,14 +568,18 @@ AcpiNsDumpOneObject ( if (ObjType > ACPI_TYPE_LOCAL_MAX) { - AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n", + AcpiOsPrintf ( + "(Pointer to ACPI Object type %.2X [UNKNOWN])\n", ObjType); + BytesToDump = 32; } else { - AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [%s])\n", + AcpiOsPrintf ( + "(Pointer to ACPI Object type %.2X [%s])\n", ObjType, AcpiUtGetTypeName (ObjType)); + BytesToDump = sizeof (ACPI_OPERAND_OBJECT); } @@ -601,7 +609,8 @@ AcpiNsDumpOneObject ( */ BytesToDump = ObjDesc->String.Length; ObjDesc = (void *) ObjDesc->String.Pointer; - AcpiOsPrintf ( "(Buffer/String pointer %p length %X)\n", + + AcpiOsPrintf ("(Buffer/String pointer %p length %X)\n", ObjDesc, BytesToDump); ACPI_DUMP_BUFFER (ObjDesc, BytesToDump); goto Cleanup; @@ -702,8 +711,8 @@ AcpiNsDumpObjects ( Info.DisplayType = DisplayType; (void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, - ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, - AcpiNsDumpOneObject, NULL, (void *) &Info, NULL); + ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, + AcpiNsDumpOneObject, NULL, (void *) &Info, NULL); (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); } @@ -753,7 +762,7 @@ AcpiNsDumpOneObjectPath ( return (AE_OK); } - Pathname = AcpiNsGetExternalPathname (Node); + Pathname = AcpiNsGetNormalizedPathname (Node, TRUE); PathIndent = 1; if (Level <= MaxLevel) @@ -839,14 +848,14 @@ AcpiNsDumpObjectPaths ( /* Get the max depth of the namespace tree, for formatting later */ (void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, - ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, - AcpiNsGetMaxDepth, NULL, (void *) &MaxLevel, NULL); + ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, + AcpiNsGetMaxDepth, NULL, (void *) &MaxLevel, NULL); /* Now dump the entire namespace */ (void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, - ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, - AcpiNsDumpOneObjectPath, NULL, (void *) &MaxLevel, NULL); + ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, + AcpiNsDumpOneObjectPath, NULL, (void *) &MaxLevel, NULL); (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); } @@ -917,7 +926,8 @@ AcpiNsDumpTables ( * If the name space has not been initialized, * there is nothing to dump. */ - ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "namespace not initialized!\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, + "namespace not initialized!\n")); return_VOID; } @@ -930,7 +940,7 @@ AcpiNsDumpTables ( } AcpiNsDumpObjects (ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, MaxDepth, - ACPI_OWNER_ID_MAX, SearchHandle); + ACPI_OWNER_ID_MAX, SearchHandle); return_VOID; } #endif |