]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/BootMonFs: Fix flushing new files
authorBrendan Jackman <brendan.jackman@arm.com>
Thu, 8 May 2014 15:06:06 +0000 (15:06 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 May 2014 15:06:06 +0000 (15:06 +0000)
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

ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c

index 1b5cc48937683ae0adb0e0363fdc130f95903e04..702538971437aa5a31220a40a72aac3216dc3133 100644 (file)
@@ -309,8 +309,8 @@ BootMonFsFlushFile (
     FileStart = File->HwDescription.BlockStart * BlockSize;\r
   }\r
 \r
-  // FileEnd is the NOR address of the end of the file's data\r
-  FileEnd = FileStart + BootMonFsGetImageLength (File);\r
+  // FileEnd is the current NOR address of the end of the file's data\r
+  FileEnd = FileStart + File->HwDescription.Region[0].Size;\r
 \r
   for (RegionToFlushLink = GetFirstNode (&File->RegionToFlushLink);\r
        !IsNull (&File->RegionToFlushLink, RegionToFlushLink);\r