diff options
author | Yuwei Chen <yuwei.chen@intel.com> | 2025-04-09 15:15:19 +0800 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2025-04-11 10:40:17 +0800 |
commit | 7c6ef8eac2608e91d20c9df02930ae9b50e3fdd1 (patch) | |
tree | 848640058b1dd79647c2d313ca6f53e179b21655 /BaseTools/Source/Python | |
parent | 18988ea3e6dfb5e0eb51c0497873fb1770ee5e2d (diff) | |
download | edk2-7c6ef8eac2608e91d20c9df02930ae9b50e3fdd1.zip edk2-7c6ef8eac2608e91d20c9df02930ae9b50e3fdd1.tar.gz edk2-7c6ef8eac2608e91d20c9df02930ae9b50e3fdd1.tar.bz2 |
BaseTools: Fix FMMT Compress wrong behavior
When using the replace function, if the replaced file
located in a compress section, then the tool will re-build
the section. As the compress status set in the wrong place,
in some situation, the compress will do twice times which is
a wrong behavior.
This patch is used to fix this issue.
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/FMMT/core/FvHandler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/FMMT/core/FvHandler.py b/BaseTools/Source/Python/FMMT/core/FvHandler.py index 7a60760..6d6a9c2 100644 --- a/BaseTools/Source/Python/FMMT/core/FvHandler.py +++ b/BaseTools/Source/Python/FMMT/core/FvHandler.py @@ -248,8 +248,8 @@ class FvHandler: elif len(CompressedData) > len(TargetTree.Data.OriData):
New_Pad_Size = GetPadSize(len(CompressedData), SECTION_COMMON_ALIGNMENT)
self.Remain_New_Free_Space = len(CompressedData) + New_Pad_Size - len(TargetTree.Data.OriData) - len(TargetTree.Data.PadData)
- self.ModifyTest(TargetTree, self.Remain_New_Free_Space)
self.Status = True
+ self.ModifyTest(TargetTree, self.Remain_New_Free_Space)
def ModifyTest(self, ParTree, Needed_Space: int) -> None:
# If have needed space, will find if there have free space in parent tree, meanwhile update the node data.
|