[edk2] [Patch] BaseTools: Support H"{}" format for Sructure Pcd.

BobCF posted 1 patch 6 years, 9 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/Workspace/DscBuildData.py | 1 -
1 file changed, 1 deletion(-)
[edk2] [Patch] BaseTools: Support H"{}" format for Sructure Pcd.
Posted by BobCF 6 years, 9 months ago
Support H"{}" format for Sructure Pcd from 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>
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 9d787702c2..edf90dbd59 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -911,11 +911,10 @@ class DscBuildData(PlatformBuildClassObject):
             if not ValueStr[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"{...}"')
             ValueStr = ValueStr[0] + '"' + ValueStr[1:] + '"'
             PredictedFieldType = "VOID*"
         elif ValueStr.startswith('H') or ValueStr.startswith('{'):
-            EdkLogger.error("build", FORMAT_INVALID, 'Currently we do not support assign H"{...}" format for Pcd field.', ExtraData="%s.%s.%s from command line" % (TokenSpaceGuidCName, TokenCName, FieldName))
             ValueStr = ValueStr[1:]
             PredictedFieldType = "VOID*"
         elif ValueStr.upper() in ['TRUE', '0X1', '0X01', '1', 'FALSE', '0X0', '0X00', '0']:
             PredictedFieldType = "BOOLEAN"
         elif ValueStr.isdigit() or ValueStr.upper().startswith('0X'):
-- 
2.14.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Support H"{}" format for Sructure Pcd.
Posted by Gao, Liming 6 years, 9 months ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Feng, Bob C
>Sent: Monday, March 05, 2018 2:11 PM
>To: edk2-devel@lists.01.org
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: Support H"{}" format for Sructure Pcd.
>
>Support H"{}" format for Sructure Pcd from 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>
>---
> BaseTools/Source/Python/Workspace/DscBuildData.py | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
>b/BaseTools/Source/Python/Workspace/DscBuildData.py
>index 9d787702c2..edf90dbd59 100644
>--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
>+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
>@@ -911,11 +911,10 @@ class DscBuildData(PlatformBuildClassObject):
>             if not ValueStr[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"{...}"')
>             ValueStr = ValueStr[0] + '"' + ValueStr[1:] + '"'
>             PredictedFieldType = "VOID*"
>         elif ValueStr.startswith('H') or ValueStr.startswith('{'):
>-            EdkLogger.error("build", FORMAT_INVALID, 'Currently we do not
>support assign H"{...}" format for Pcd field.', ExtraData="%s.%s.%s from
>command line" % (TokenSpaceGuidCName, TokenCName, FieldName))
>             ValueStr = ValueStr[1:]
>             PredictedFieldType = "VOID*"
>         elif ValueStr.upper() in ['TRUE', '0X1', '0X01', '1', 'FALSE', '0X0', '0X00', '0']:
>             PredictedFieldType = "BOOLEAN"
>         elif ValueStr.isdigit() or ValueStr.upper().startswith('0X'):
>--
>2.14.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel