From: "Gao, Liming" <liming.gao@intel.com>
To: "Feng, Bob C" <bob.c.feng@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] BaseTool: Fixed the StructurePcd incorrect value.
Date: Thu, 25 Jan 2018 10:06:18 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1AC737@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20180125074225.17072-1-bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: Feng, Bob C
>Sent: Thursday, January 25, 2018 3:42 PM
>To: edk2-devel@lists.01.org
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTool: Fixed the StructurePcd incorrect value.
>
>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 <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>---
> BaseTools/Source/Python/Workspace/BuildClassObject.py | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py
>b/BaseTools/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 = validlists
> self.expressions = expressions
> self.DscDefaultValue = None
> if IsDsc:
> self.DscDefaultValue = Value
>-
>+
> ## 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))
>
> class StructurePcd(PcdClassObject):
>- def __init__(self, StructuredPcdIncludeFile="", Packages=None,
>Name=None, Guid=None, Type=None, DatumType=None, Value=None,
>Token=None, MaxDatumSize=None, SkuInfoList={}, IsOverrided=False,
>GuidValue=None, validateranges=[], validlists=[],
>expressions=[],default_store = TAB_DEFAULT_STORES_DEFAULT):
>+ def __init__(self, StructuredPcdIncludeFile=None, Packages=None,
>Name=None, Guid=None, Type=None, DatumType=None, Value=None,
>Token=None, MaxDatumSize=None, SkuInfoList=None, IsOverrided=False,
>GuidValue=None, validateranges=None, validlists=None,
>expressions=None,default_store = TAB_DEFAULT_STORES_DEFAULT):
>+ if SkuInfoList is None: SkuInfoList={}
>+ if validateranges is None: validateranges=[]
>+ if validlists is None: validlists=[]
>+ if expressions is None : expressions=[]
> super(StructurePcd, self).__init__(Name, Guid, Type, DatumType, Value,
>Token, MaxDatumSize, SkuInfoList, IsOverrided, GuidValue, validateranges,
>validlists, expressions)
> self.StructuredPcdIncludeFile = StructuredPcdIncludeFile
> self.PackageDecs = Packages
> self.DefaultStoreName = [default_store]
> self.DefaultValues = collections.OrderedDict({})
>@@ -435,6 +439,5 @@ class PlatformBuildClassObject(object):
> #
> # @retval string Key for hash table
> #
> def __hash__(self):
> return hash(self.MetaFile)
>-
>--
>2.14.3.windows.1
prev parent reply other threads:[~2018-01-25 10:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 7:42 [Patch] BaseTool: Fixed the StructurePcd incorrect value BobCF
2018-01-25 10:06 ` Gao, Liming [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E1AC737@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox