summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/FfsInfStatement.py
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-04-14 04:51:35 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-17 20:49:54 +0800
commit227dbb11905008602b583b06f2b84e741bdd09e0 (patch)
tree278b5fbc7464dd85b5677659a4680bc600764366 /BaseTools/Source/Python/GenFds/FfsInfStatement.py
parentcdc9b0c2966a8681a2b4e14c2cf75bf1e37815a1 (diff)
downloadedk2-227dbb11905008602b583b06f2b84e741bdd09e0.tar.gz
edk2-227dbb11905008602b583b06f2b84e741bdd09e0.tar.bz2
edk2-227dbb11905008602b583b06f2b84e741bdd09e0.zip
BaseTools: FdfParser - refactor functions to make static
make functions that doesn't use self into @staticmethod 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>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FfsInfStatement.py')
-rw-r--r--BaseTools/Source/Python/GenFds/FfsInfStatement.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index 5364569b96..4f9936a973 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -1011,7 +1011,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
if VfrUniOffsetList:
UniVfrOffsetFileName = os.path.join(self.OutputPath, self.BaseName + '.offset')
UniVfrOffsetFileSection = os.path.join(self.OutputPath, self.BaseName + 'Offset' + '.raw')
- self.__GenUniVfrOffsetFile (VfrUniOffsetList, UniVfrOffsetFileName)
+ FfsInfStatement.__GenUniVfrOffsetFile (VfrUniOffsetList, UniVfrOffsetFileName)
UniVfrOffsetFileNameList = []
UniVfrOffsetFileNameList.append(UniVfrOffsetFileName)
"""Call GenSection"""
@@ -1069,11 +1069,11 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# Create parameter string for GenFfs
#
- # @param self The object pointer
# @param Rule The rule object used to generate section
# @retval tuple (FileType, Fixed, CheckSum, Alignment)
#
- def __GetGenFfsCmdParameter__(self, Rule):
+ @staticmethod
+ def __GetGenFfsCmdParameter__(Rule):
result = tuple()
result += ('-t', Ffs.Ffs.FdfFvFileTypeToFileType[Rule.FvFileType])
if Rule.Fixed != False:
@@ -1103,11 +1103,11 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# Generate the offset file for the module which contain VFR or UNI file.
#
- # @param self The object pointer
# @param VfrUniOffsetList A list contain the VFR/UNI offsets in the EFI image file.
# @param UniVfrOffsetFileName The output offset file name.
#
- def __GenUniVfrOffsetFile(self, VfrUniOffsetList, UniVfrOffsetFileName):
+ @staticmethod
+ def __GenUniVfrOffsetFile(VfrUniOffsetList, UniVfrOffsetFileName):
# Use a instance of StringIO to cache data
fStringIO = StringIO.StringIO('')