diff options
| author | Kory Maincent <[email protected]> | 2026-01-19 17:07:41 +0100 |
|---|---|---|
| committer | Ilias Apalodimas <[email protected]> | 2026-02-11 12:17:18 +0200 |
| commit | e8d9ad18f068f65537bc04779d6110a1058bfb1e (patch) | |
| tree | eba32643cb30206e3755021793d99ed91c9363a7 /lib/efi_loader | |
| parent | b99da05e1538b8fa153322da82917af2aa27e1d6 (diff) | |
fwu: Pass bank state enum to fwu_state_machine_updates()
Change fwu_state_machine_updates() to accept an enum fwu_bank_states
parameter instead of a boolean. This makes the function interface more
explicit and prepares for adding FWU_BANK_INVALID support to handle
boot failures on the active bank.
Convert the FWU_BANK_* defines to an enum and update all call sites
accordingly.
Signed-off-by: Kory Maincent <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'lib/efi_loader')
| -rw-r--r-- | lib/efi_loader/efi_capsule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 89e63ed8dd5..e0f9a6efa25 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -465,7 +465,7 @@ static __maybe_unused efi_status_t fwu_empty_capsule_process( log_err("Unable to set the Accept bit for the image %pUs\n", image_guid); - status = fwu_state_machine_updates(0, active_idx); + status = fwu_state_machine_updates(FWU_BANK_ACCEPTED, active_idx); if (status < 0) ret = EFI_DEVICE_ERROR; @@ -510,7 +510,8 @@ static __maybe_unused efi_status_t fwu_post_update_process(bool fw_accept_os) log_err("Failed to update FWU metadata index values\n"); } else { log_debug("Successfully updated the active_index\n"); - status = fwu_state_machine_updates(fw_accept_os ? 1 : 0, + status = fwu_state_machine_updates(fw_accept_os ? + FWU_BANK_VALID : FWU_BANK_ACCEPTED, update_index); if (status < 0) ret = EFI_DEVICE_ERROR; |
