From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.5911.1624446351402392408 for ; Wed, 23 Jun 2021 04:05:51 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 08B421063; Wed, 23 Jun 2021 04:05:51 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.78.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1FC013F719; Wed, 23 Jun 2021 04:05:49 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sami.Mujawar@arm.com, Alexei.Fedorov@arm.com Subject: [PATCH v1 07/10] DynamicTablesPkg: Use %a formatter in AmlDbgPrint Date: Wed, 23 Jun 2021 12:05:21 +0100 Message-Id: <20210623110525.6171-8-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210623110525.6171-1-Pierre.Gondois@arm.com> References: <20210623110525.6171-1-Pierre.Gondois@arm.com> From: Pierre Gondois The correct formatter to print a CHAR8 char in edk2 is '%a'. Replace the '%s' formatters by '%a'. 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 00a61a2fe63a..7f4cd3404dbb 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] )); -- 2.17.1