From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 82BD921163272 for ; Wed, 24 Oct 2018 00:25:31 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 00:25:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,419,1534834800"; d="scan'208";a="80476818" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 24 Oct 2018 00:25:30 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 Oct 2018 00:25:30 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 Oct 2018 00:25:29 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.102]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.161]) with mapi id 14.03.0415.000; Wed, 24 Oct 2018 15:25:28 +0800 From: "Feng, Bob C" To: "Zhao, ZhiqiangX" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH] BaseTools:Translate the StructurePCD value in field to correct format. Thread-Index: AQHUadXK8QjAM5DZPkuBeAg4iQgSe6UuAcIQ Date: Wed, 24 Oct 2018 07:25:27 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D15FFE5F06@SHSMSX101.ccr.corp.intel.com> References: <20181022070559.76680-1-zhiqiangx.zhao@intel.com> In-Reply-To: <20181022070559.76680-1-zhiqiangx.zhao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzU3MTNkYjItYmRlMy00Njk0LWE0MzgtNmRlMDIzMDZhZDNlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieGpXd2hXeDZzalEwWFhoT0orUnVtTmR5djFMbVZLYlp1eWY3ZzdPNnVVVFp0UXNzZkQxb29ZOHd1VEhkcjNrMiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools:Translate the StructurePCD value in field to correct format. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 07:25:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: Zhao, ZhiqiangX=20 Sent: Monday, October 22, 2018 3:06 PM To: edk2-devel@lists.01.org Cc: Zhao, ZhiqiangX ; Gao, Liming ; Zhu, Yonghong ; Feng, Bob C Subject: [PATCH] BaseTools:Translate the StructurePCD value in field to cor= rect format. For StructurePCD value got from DSC file, translate its field value in to c= orrect format in report. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng --- BaseTools/Source/Python/Workspace/DscBuildData.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 17e6f62cac..9b1be3ec59 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1925,15 +1925,12 @@ class DscBuildData(PlatformBuildClassObject): IsArray =3D IsFieldValueAnArray(FieldList[FieldName][0= ]) if IsArray: try: - FieldValue =3D ValueExpressionEx(FieldList[Fie= ldName][0], TAB_VOID, self._GuidDict)(True) + FieldList[FieldName][0] =3D=20 + ValueExpressionEx(FieldList[FieldName][0], TAB_VOID,=20 + self._GuidDict)(True) except BadExpression: EdkLogger.error('Build', FORMAT_INVALID, "Inva= lid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidC= Name, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[Field= Name][2])) try: - if IsArray: - Value, ValueSize =3D ParseFieldValue (FieldVal= ue) - else: - Value, ValueSize =3D ParseFieldValue (FieldLis= t[FieldName][0]) + Value, ValueSize =3D ParseFieldValue=20 + (FieldList[FieldName][0]) except Exception: EdkLogger.error('Build', FORMAT_INVALID, "Invalid = value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidCName= , Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName= ][2])) if isinstance(Value, str): -- 2.14.1.windows.1