Sync EDKII BaseTools to BaseTools project r2068.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10937 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1172,14 +1172,15 @@ def ParseConsoleLog(Filename):
|
||||
#
|
||||
def CheckPcdDatum(Type, Value):
|
||||
if Type == "VOID*":
|
||||
if not ((Value.startswith('L"') or Value.startswith('"') and Value.endswith('"'))
|
||||
if not (((Value.startswith('L"') or Value.startswith('"')) and Value.endswith('"'))
|
||||
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)
|
||||
elif Type == 'BOOLEAN':
|
||||
if Value not in ['TRUE', 'FALSE']:
|
||||
return False, "Invalid value [%s] of type [%s]; must be TRUE or FALSE" % (Value, Type)
|
||||
if Value not in ['TRUE', 'True', 'true', '0x1', '0x01', '1', 'FALSE', 'False', 'false', '0x0', '0x00', '0']:
|
||||
return False, "Invalid value [%s] of type [%s]; must be one of TRUE, True, true, 0x1, 0x01, 1"\
|
||||
", FALSE, False, false, 0x0, 0x00, 0" % (Value, Type)
|
||||
elif type(Value) == type(""):
|
||||
try:
|
||||
Value = long(Value, 0)
|
||||
|
Reference in New Issue
Block a user