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

ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c

index 778af389a0088cb0bc97d0e0030498e60ed14662..1b5cc48937683ae0adb0e0363fdc130f95903e04 100644 (file)
@@ -204,6 +204,11 @@ BootMonFsFindSpaceForNewFile (
          )\r
   {\r
     FileEntry = BOOTMON_FS_FILE_FROM_LINK_THIS (FileLink);\r
+    // Skip files that aren't on disk yet\r
+    if (FileEntry->HwDescription.RegionCount == 0) {\r
+      continue;\r
+    }\r
+\r
     // If the free space preceding the file is big enough to contain the new\r
     // file then use it!\r
     if (((FileEntry->HwDescription.BlockStart * BlockSize) - *FileStart)\r