From nobody Mon May 6 02:33:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532479629263163.27735782929471; Tue, 24 Jul 2018 17:47:09 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8C6DE210C1B8A; Tue, 24 Jul 2018 17:47:08 -0700 (PDT) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7FA5C210C1B7B for ; Tue, 24 Jul 2018 17:47:07 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 17:47:07 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga004.jf.intel.com with ESMTP; 24 Jul 2018 17:46:59 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,399,1526367600"; d="scan'208";a="218822672" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Wed, 25 Jul 2018 08:46:57 +0800 Message-Id: <1532479617-6196-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] BaseTools: Fix bug about *M value not display decimal and hexadecimal X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Yunhua Feng V2: Add the check for Pcd DatumType report format like as below: *M Shell.inf =3D 0xFF (255) Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/build/BuildReport.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index 176a390..dd5d1c0 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1117,11 +1117,17 @@ class PcdReport(object): if IsByteArray: FileWrite(File, ' *M %-*s =3D %s' % (s= elf.MaxLen + 15, ModulePath, '{')) for Array in ArrayList: FileWrite(File, Array) else: - FileWrite(File, ' *M %-*s =3D %s' % (s= elf.MaxLen + 15, ModulePath, ModuleDefault.strip())) + Value =3D ModuleDefault.strip() + if Pcd.DatumType in TAB_PCD_CLEAN_NUMERIC_= TYPES: + if Value.startswith(('0x', '0X')): + Value =3D '{} ({:d})'.format(Value= , int(Value, 0)) + else: + Value =3D "0x{:X} ({})".format(int= (Value, 0), Value) + FileWrite(File, ' *M %-*s =3D %s' % (s= elf.MaxLen + 15, ModulePath, Value)) =20 if ModulePcdSet is None: FileWrite(File, gSectionEnd) else: if not ReportSubType and ModulePcdSet: --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel