summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c')
-rw-r--r--ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c b/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c
index 1b5cc4893..702538971 100644
--- a/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c
+++ b/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c
@@ -309,8 +309,8 @@ BootMonFsFlushFile (
FileStart = File->HwDescription.BlockStart * BlockSize;
}
- // FileEnd is the NOR address of the end of the file's data
- FileEnd = FileStart + BootMonFsGetImageLength (File);
+ // FileEnd is the current NOR address of the end of the file's data
+ FileEnd = FileStart + File->HwDescription.Region[0].Size;
for (RegionToFlushLink = GetFirstNode (&File->RegionToFlushLink);
!IsNull (&File->RegionToFlushLink, RegionToFlushLink);