From bf6091a95a6f27c500237b734670a4ec12430a94 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Thu, 8 May 2014 15:05:10 +0000 Subject: [PATCH] ArmPlatformPkg/BootMonFs: Fix finding space for 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@15515 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c b/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c index 778af389a0..1b5cc48937 100644 --- a/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c +++ b/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c @@ -204,6 +204,11 @@ BootMonFsFindSpaceForNewFile ( ) { FileEntry = BOOTMON_FS_FILE_FROM_LINK_THIS (FileLink); + // Skip files that aren't on disk yet + if (FileEntry->HwDescription.RegionCount == 0) { + continue; + } + // If the free space preceding the file is big enough to contain the new // file then use it! if (((FileEntry->HwDescription.BlockStart * BlockSize) - *FileStart)