From e29771bb6e896d212f92ea32e67deacbecb51bea Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Thu, 8 May 2014 15:06:06 +0000 Subject: ArmPlatformPkg/BootMonFs: Fix flushing new files Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brendan Jackman Reviewed-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15516 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ArmPlatformPkg') 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); -- cgit v1.2.3