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>
This commit is contained in:
Oliver Steffen 2024-03-04 15:32:58 +01:00 committed by mergify[bot]
parent f9c2f2fa0f
commit 80b59ff832

View File

@ -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;