From 235ff9fcd167e102612a1542edb2d9f94eda6fb8 Mon Sep 17 00:00:00 2001 From: Pierre Gondois Date: Thu, 30 Sep 2021 08:48:18 +0100 Subject: [PATCH] DynamicTablesPkg: Use %a formatter in AmlDbgPrint The correct formatter to print a CHAR8 char in edk2 is '%a'. Replace the '%s' formatters by '%a'. Reviewed-by: Sami Mujawar Signed-off-by: Pierre Gondois --- .../Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c b/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c index 00a61a2fe6..7f4cd3404d 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c @@ -2,7 +2,7 @@ AML Print Function. Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
- Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.
+ Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -199,7 +199,7 @@ AmlDbgPrintNodeHeader ( DEBUG (( DEBUG_INFO, - "%3d | %-15s | ", + "%3d | %-15a | ", Level, NodeTypeStrTbl[Node->NodeType] )); @@ -227,7 +227,7 @@ AmlDbgPrintDataNode ( AmlDbgPrintNodeHeader ((AML_NODE_HEADER*)DataNode, Level); - DEBUG ((DEBUG_INFO, "%-36s | ", NodeDataTypeStrTbl[DataNode->DataType])); + DEBUG ((DEBUG_INFO, "%-36a | ", NodeDataTypeStrTbl[DataNode->DataType])); DEBUG ((DEBUG_INFO, "0x%04x | ", DataNode->Size)); if ((DataNode->DataType == EAmlNodeDataTypeNameString) || @@ -300,13 +300,13 @@ AmlDbgPrintObjectNode ( // Print a string corresponding to the field object OpCode/SubOpCode. if (AmlNodeHasAttribute (ObjectNode, AML_IS_FIELD_ELEMENT)) { - DEBUG ((DEBUG_INFO, "%-15s ", AmlGetFieldOpCodeStr ( + DEBUG ((DEBUG_INFO, "%-15a ", AmlGetFieldOpCodeStr ( ObjectNode->AmlByteEncoding->OpCode, 0 ))); } else { // Print a string corresponding to the object OpCode/SubOpCode. - DEBUG ((DEBUG_INFO, "%-15s | ", AmlGetOpCodeStr ( + DEBUG ((DEBUG_INFO, "%-15a | ", AmlGetOpCodeStr ( ObjectNode->AmlByteEncoding->OpCode, ObjectNode->AmlByteEncoding->SubOpCode) )); @@ -378,19 +378,19 @@ AmlDbgPrintTableHeader ( DEBUG ((DEBUG_INFO, "Lvl | Node Type |\n")); DEBUG (( DEBUG_INFO, - " | %-15s | Signature| Length | Rev | CSum | OemId | " + " | %-15a | Signature| Length | Rev | CSum | OemId | " "OemTableId | OemRev | CreatorId| CreatorRev\n", NodeTypeStrTbl[EAmlNodeRoot] )); DEBUG (( DEBUG_INFO, - " | %-15s | Op | SubOp| OpName | MaxI| Attribute | " + " | %-15a | Op | SubOp| OpName | MaxI| Attribute | " "PkgLen | NodeName (opt)\n", NodeTypeStrTbl[EAmlNodeObject] )); DEBUG (( DEBUG_INFO, - " | %-15s | Data Type | Size | " + " | %-15a | Data Type | Size | " "Buffer\n", NodeTypeStrTbl[EAmlNodeData] ));