From nobody Fri Nov 1 10:28:51 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 Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1516866161005228.55453191014738; Wed, 24 Jan 2018 23:42:41 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BB07D21F833CD; Wed, 24 Jan 2018 23:37:10 -0800 (PST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 5772A21E256AD for ; Wed, 24 Jan 2018 23:37:07 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 23:42:36 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by fmsmga004.fm.intel.com with ESMTP; 24 Jan 2018 23:42:35 -0800 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=192.55.52.93; helo=mga11.intel.com; envelope-from=bob.c.feng@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.46,411,1511856000"; d="scan'208";a="24589418" From: BobCF To: edk2-devel@lists.01.org Date: Thu, 25 Jan 2018 15:42:25 +0800 Message-Id: <20180125074225.17072-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [Patch] BaseTool: Fixed the StructurePcd incorrect value. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" If user not set Structure overall value in Dsc, Structure Pcd value would be incorrect. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTo= ols/Source/Python/Workspace/BuildClassObject.py index e5f1f01556..947ac1f466 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -65,11 +65,11 @@ class PcdClassObject(object): self.validlists =3D validlists self.expressions =3D expressions self.DscDefaultValue =3D None if IsDsc: self.DscDefaultValue =3D Value - =20 + ## Convert the class to a string # # Convert each member of the class to string # Organize to a signle line format string # @@ -107,11 +107,15 @@ class PcdClassObject(object): # def __hash__(self): return hash((self.TokenCName, self.TokenSpaceGuidCName)) =20 class StructurePcd(PcdClassObject): - def __init__(self, StructuredPcdIncludeFile=3D"", Packages=3DNone, Nam= e=3DNone, Guid=3DNone, Type=3DNone, DatumType=3DNone, Value=3DNone, Token= =3DNone, MaxDatumSize=3DNone, SkuInfoList=3D{}, IsOverrided=3DFalse, GuidVa= lue=3DNone, validateranges=3D[], validlists=3D[], expressions=3D[],default_= store =3D TAB_DEFAULT_STORES_DEFAULT): + def __init__(self, StructuredPcdIncludeFile=3DNone, Packages=3DNone, N= ame=3DNone, Guid=3DNone, Type=3DNone, DatumType=3DNone, Value=3DNone, Token= =3DNone, MaxDatumSize=3DNone, SkuInfoList=3DNone, IsOverrided=3DFalse, Guid= Value=3DNone, validateranges=3DNone, validlists=3DNone, expressions=3DNone,= default_store =3D TAB_DEFAULT_STORES_DEFAULT): + if SkuInfoList is None: SkuInfoList=3D{} + if validateranges is None: validateranges=3D[] + if validlists is None: validlists=3D[] + if expressions is None : expressions=3D[] super(StructurePcd, self).__init__(Name, Guid, Type, DatumType, Va= lue, Token, MaxDatumSize, SkuInfoList, IsOverrided, GuidValue, validaterang= es, validlists, expressions) self.StructuredPcdIncludeFile =3D StructuredPcdIncludeFile self.PackageDecs =3D Packages self.DefaultStoreName =3D [default_store] self.DefaultValues =3D collections.OrderedDict({}) @@ -435,6 +439,5 @@ class PlatformBuildClassObject(object): # # @retval string Key for hash table # def __hash__(self): return hash(self.MetaFile) - --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel