summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsOpenClose.c5
1 files changed, 5 insertions, 0 deletions
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)