summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r--BaseTools/Source/Python/Common/DataType.py2
-rw-r--r--BaseTools/Source/Python/Common/Expression.py2
-rw-r--r--BaseTools/Source/Python/Common/Misc.py4
3 files changed, 5 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py
index 2662132e51..5030df27b4 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -40,6 +40,7 @@ TAB_UINT16 = 'UINT16'
TAB_UINT32 = 'UINT32'
TAB_UINT64 = 'UINT64'
TAB_VOID = 'VOID*'
+TAB_GUID = 'GUID'
TAB_PCD_CLEAN_NUMERIC_TYPES = {TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64}
TAB_PCD_NUMERIC_TYPES = {TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, 'BOOLEAN'}
@@ -48,6 +49,7 @@ TAB_PCD_NUMERIC_TYPES_VOID = {TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, 'BO
TAB_EDK_SOURCE = '$(EDK_SOURCE)'
TAB_EFI_SOURCE = '$(EFI_SOURCE)'
TAB_WORKSPACE = '$(WORKSPACE)'
+TAB_FV_DIRECTORY = 'FV'
TAB_ARCH_NULL = ''
TAB_ARCH_COMMON = 'COMMON'
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 53504c110d..9fec10d2bb 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -951,7 +951,7 @@ class ValueExpressionEx(ValueExpression):
Size = 0
ValueStr = ''
TokenSpaceGuidName = ''
- if Item.startswith('GUID') and Item.endswith(')'):
+ if Item.startswith(TAB_GUID) and Item.endswith(')'):
try:
TokenSpaceGuidName = re.search('GUID\((\w+)\)', Item).group(1)
except:
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index f05ae39ebb..3d205197ab 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -1219,7 +1219,7 @@ class tdict:
def IsFieldValueAnArray (Value):
Value = Value.strip()
- if Value.startswith('GUID') and Value.endswith(')'):
+ if Value.startswith(TAB_GUID) and Value.endswith(')'):
return True
if Value.startswith('L"') and Value.endswith('"') and len(list(Value[2:-1])) > 1:
return True
@@ -1316,7 +1316,7 @@ def ParseFieldValue (Value):
if Size > 8:
raise BadExpression('Value (%s) Size larger than %d' % (Value, Size))
return Value, 8
- if Value.startswith('GUID') and Value.endswith(')'):
+ if Value.startswith(TAB_GUID) and Value.endswith(')'):
Value = Value.split('(', 1)[1][:-1].strip()
if Value[0] == '{' and Value[-1] == '}':
TmpValue = GuidStructureStringToGuidString(Value)