summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorOliver Steffen <osteffen@redhat.com>2024-03-04 15:32:58 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-06-07 03:57:02 +0000
commit80b59ff8320d1bd134bf689fe9c0ddf4e0473b88 (patch)
tree93cbb14eb352111256746c528cf06572e5c3372c /MdeModulePkg
parentf9c2f2fa0fd92f94d6c20292f37d5302762cad66 (diff)
downloadedk2-80b59ff8320d1bd134bf689fe9c0ddf4e0473b88.tar.gz
edk2-80b59ff8320d1bd134bf689fe9c0ddf4e0473b88.tar.bz2
edk2-80b59ff8320d1bd134bf689fe9c0ddf4e0473b88.zip
MdeModulePkg: Warn if out of flash space when writing variables
Emit a DEBUG_WARN message if there is not enough flash space left to write/update a variable. This condition is currently not logged appropriately in all cases, given that full variable store can easily render the system unbootable. This new message helps identifying this condition. Signed-off-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index d394d237a5..1c7659031d 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -2364,6 +2364,8 @@ Done:
);
ASSERT_EFI_ERROR (Status);
}
+ } else if (Status == EFI_OUT_OF_RESOURCES) {
+ DEBUG ((DEBUG_WARN, "UpdateVariable failed: Out of flash space\n"));
}
return Status;