diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2018-01-31 16:49:14 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-02-01 09:21:47 +0800 |
commit | 6f49996cedfb198beb374ea0cb89a06a71ef960c (patch) | |
tree | cebcdee6a3a775494d658bc0330141994c2d3bb5 /BaseTools/Source/Python/Common | |
parent | 81add864f4af238a2dfb702904a6abec12738b9d (diff) | |
download | edk2-6f49996cedfb198beb374ea0cb89a06a71ef960c.tar.gz edk2-6f49996cedfb198beb374ea0cb89a06a71ef960c.tar.bz2 edk2-6f49996cedfb198beb374ea0cb89a06a71ef960c.zip |
BaseTools: Structure Pcd in CommandLine.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r-- | BaseTools/Source/Python/Common/Expression.py | 2 | ||||
-rw-r--r-- | BaseTools/Source/Python/Common/Misc.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index 486c537029..b8c48460ff 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -791,7 +791,7 @@ class ValueExpressionEx(ValueExpression): raise BadExpression('Type %s PCD Value Size is Larger than 4 byte' % self.PcdType)
if self.PcdType == 'UINT64' and Size > 8:
raise BadExpression('Type %s PCD Value Size is Larger than 8 byte' % self.PcdType)
- if self.PcdType in ['VOID*']:
+ else:
try:
TmpValue = long(PcdValue)
TmpList = []
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index ef52154f47..b34cb4c3be 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -2348,7 +2348,7 @@ def PackRegistryFormatGuid(Guid): )
def BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, Value):
- if PcdDatumType == 'VOID*':
+ if PcdDatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64,'BOOLEAN']:
if Value.startswith('L'):
if not Value[1]:
EdkLogger.error("build", FORMAT_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", H"{...}"')
|