]> git.dujemihanovic.xyz Git - u-boot.git/commit
fwu: fix fwu_get_image_index interface
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Thu, 11 Jan 2024 05:35:39 +0000 (14:35 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 13 Jan 2024 17:17:47 +0000 (18:17 +0100)
commitaf7a34acfd88815ead1882eb8b05ef088d7ca738
tree0e0ae3f7c9c4d0afc57804d0601a2b1e8f22baea
parentf19171c919e03c2590dce2f5026de2bf43203f7c
fwu: fix fwu_get_image_index interface

The capsule update uses the DFU framework for updating
storage. fwu_get_image_index() currently returns the
image_index calculated by (dfu_alt_num + 1), but this is
different from the image_index in UEFI terminology.

Since capsule update implementation calls dfu_write_by_alt
function, it is better that FWU returns the dfu_alt_num.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
include/fwu.h
lib/efi_loader/efi_firmware.c
lib/fwu_updates/fwu.c