From: Brendan Jackman Date: Thu, 8 May 2014 15:05:10 +0000 (+0000) Subject: ArmPlatformPkg/BootMonFs: Fix finding space for new files X-Git-Tag: edk2-stable201903~11475 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=bf6091a95a6f27c500237b734670a4ec12430a94 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 --- 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)