Skip to content
Snippets Groups Projects
Commit 6f933aa9 authored by Sughosh Ganu's avatar Sughosh Ganu Committed by Ilias Apalodimas
Browse files

fwu: print a message if empty capsule checks fail


When dealing with processing of the empty capsule, the capsule gets
applied only when the checks for the empty capsule pass. Print a
message to highlight if empty capsule checks fail, and return an error
value, similar to the normal capsules.

Signed-off-by: default avatarSughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: default avatarMichal Simek <michal.simek@amd.com>
Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent be281ecc
No related branches found
No related merge requests found
Pipeline #131347 failed with stages
in 2 minutes and 49 seconds
......@@ -564,9 +564,14 @@ static efi_status_t efi_capsule_update_firmware(
bool fw_accept_os;
if (IS_ENABLED(CONFIG_FWU_MULTI_BANK_UPDATE)) {
if (fwu_empty_capsule_checks_pass() &&
fwu_empty_capsule(capsule_data))
return fwu_empty_capsule_process(capsule_data);
if (fwu_empty_capsule(capsule_data)) {
if (fwu_empty_capsule_checks_pass()) {
return fwu_empty_capsule_process(capsule_data);
} else {
log_err("FWU empty capsule checks failed. Cannot start update\n");
return EFI_INVALID_PARAMETER;
}
}
if (!fwu_update_checks_pass()) {
log_err("FWU checks failed. Cannot start update\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment