diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-01-30 23:01:31 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-01-31 17:50:01 +0800 |
commit | d5988a8ac9716130a323fb12bbf81c41807c7865 (patch) | |
tree | b8b246e4b8fa10c05cfc17f077020b8ee444a764 /BaseTools/Source/Python/Common | |
parent | 86737681af34d14dfe088d806d4a5062fdfb3f1f (diff) | |
download | edk2-d5988a8ac9716130a323fb12bbf81c41807c7865.tar.gz edk2-d5988a8ac9716130a323fb12bbf81c41807c7865.tar.bz2 edk2-d5988a8ac9716130a323fb12bbf81c41807c7865.zip |
BaseTools: Update BPDG to support L'' and '' format as VPD Pcd Value
Current Pcd value support flexible format, this patch add support for
BPDG Tool to support L'' and '' format.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r-- | BaseTools/Source/Python/Common/Misc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index a8ed718aa5..ef52154f47 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -1,7 +1,7 @@ ## @file
# Common routines used by all tools
#
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -1818,10 +1818,10 @@ def CheckPcdDatum(Type, Value): if Type == "VOID*":
ValueRe = re.compile(r'\s*L?\".*\"\s*$')
if not (((Value.startswith('L"') or Value.startswith('"')) and Value.endswith('"'))
- or (Value.startswith('{') and Value.endswith('}'))
+ or (Value.startswith('{') and Value.endswith('}')) or (Value.startswith("L'") or Value.startswith("'") and Value.endswith("'"))
):
return False, "Invalid value [%s] of type [%s]; must be in the form of {...} for array"\
- ", or \"...\" for string, or L\"...\" for unicode string" % (Value, Type)
+ ", \"...\" or \'...\' for string, L\"...\" or L\'...\' for unicode string" % (Value, Type)
elif ValueRe.match(Value):
# Check the chars in UnicodeString or CString is printable
if Value.startswith("L"):
|