Basetools/GenFds: refactor class FV
1) initialize UiFvName via __init__ parameter. No change to default behavior. 2) initialize 3 empty lists in __init__. Curently not guarenteed initialized. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@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
5a264f28ee
commit
9ffaaac2e5
@ -37,8 +37,8 @@ class FV (object):
|
||||
#
|
||||
# @param self The object pointer
|
||||
#
|
||||
def __init__(self):
|
||||
self.UiFvName = None
|
||||
def __init__(self, Name=None):
|
||||
self.UiFvName = Name
|
||||
self.CreateFileName = None
|
||||
self.BlockSizeList = []
|
||||
self.DefineVarDict = {}
|
||||
@ -61,7 +61,9 @@ class FV (object):
|
||||
self.FvForceRebase = None
|
||||
self.FvRegionInFD = None
|
||||
self.UsedSizeEnable = False
|
||||
|
||||
self.FvExtEntryTypeValue = []
|
||||
self.FvExtEntryType = []
|
||||
self.FvExtEntryData = []
|
||||
## AddToBuffer()
|
||||
#
|
||||
# Generate Fv and add it to the Buffer
|
||||
@ -77,7 +79,6 @@ class FV (object):
|
||||
# @retval string Generated FV file path
|
||||
#
|
||||
def AddToBuffer (self, Buffer, BaseAddress=None, BlockSize= None, BlockNum=None, ErasePloarity='1', VtfDict=None, MacroDict = {}, Flag=False):
|
||||
|
||||
if BaseAddress is None and self.UiFvName.upper() + 'fv' in GenFdsGlobalVariable.ImageBinDict:
|
||||
return GenFdsGlobalVariable.ImageBinDict[self.UiFvName.upper() + 'fv']
|
||||
|
||||
|
Reference in New Issue
Block a user