BaseTools: replace string constants used for module types
replace raw strings in the code (note: except UPT) with constants. SUP_MODULE_BASE was 'BASE' SUP_MODULE_SEC was 'SEC' SUP_MODULE_PEI_CORE was 'PEI_CORE' SUP_MODULE_PEIM was 'PEIM' SUP_MODULE_DXE_CORE was 'DXE_CORE' SUP_MODULE_DXE_DRIVER was 'DXE_DRIVER' SUP_MODULE_DXE_RUNTIME_DRIVER was 'DXE_RUNTIME_DRIVER' SUP_MODULE_DXE_SAL_DRIVER was 'DXE_SAL_DRIVER' SUP_MODULE_DXE_SMM_DRIVER was 'DXE_SMM_DRIVER' SUP_MODULE_UEFI_DRIVER was 'UEFI_DRIVER' SUP_MODULE_UEFI_APPLICATION was 'UEFI_APPLICATION' SUP_MODULE_USER_DEFINED was 'USER_DEFINED' SUP_MODULE_SMM_CORE was 'SMM_CORE' SUP_MODULE_MM_STANDALONE was 'MM_STANDALONE' SUP_MODULE_MM_CORE_STANDALONE was 'MM_CORE_STANDALONE' Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
50874612be
commit
8bb63e377b
@ -28,6 +28,7 @@ from Common.BuildToolError import *
|
||||
from FvImageSection import FvImageSection
|
||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||
from GenFds import FindExtendTool
|
||||
from Common.DataType import *
|
||||
|
||||
## generate GUIDed section
|
||||
#
|
||||
@ -121,7 +122,7 @@ class GuidSection(GuidSectionClassObject) :
|
||||
OutputFile = OutputPath + \
|
||||
os.sep + \
|
||||
ModuleName + \
|
||||
'SEC' + \
|
||||
SUP_MODULE_SEC + \
|
||||
SecNum + \
|
||||
Ffs.SectionSuffix['GUIDED']
|
||||
OutputFile = os.path.normpath(OutputFile)
|
||||
@ -156,7 +157,7 @@ class GuidSection(GuidSectionClassObject) :
|
||||
TempFile = OutputPath + \
|
||||
os.sep + \
|
||||
ModuleName + \
|
||||
'SEC' + \
|
||||
SUP_MODULE_SEC + \
|
||||
SecNum + \
|
||||
'.tmp'
|
||||
TempFile = os.path.normpath(TempFile)
|
||||
|
Reference in New Issue
Block a user