summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/FileSystem/BootMonFs
diff options
context:
space:
mode:
authorBrendan Jackman <brendan.jackman@arm.com>2014-05-08 15:06:06 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-05-08 15:06:06 +0000
commite29771bb6e896d212f92ea32e67deacbecb51bea (patch)
tree758b293fc0ad0ad59ff7cf4a5f8b0bf83bcafb2e /ArmPlatformPkg/FileSystem/BootMonFs
parentbf6091a95a6f27c500237b734670a4ec12430a94 (diff)
downloadedk2-platforms-e29771bb6e896d212f92ea32e67deacbecb51bea.tar.xz
ArmPlatformPkg/BootMonFs: Fix flushing new files
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brendan Jackman <brendan.jackman@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15516 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/FileSystem/BootMonFs')
-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 1b5cc48937..7025389714 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);