Skip to content

Commit cf92b6f

Browse files
committed
boot: boot_serial: Fix wrong slot ID for hook calls
Fixes passing the wrong slot ID to the hook calls in serial recovery mode Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 7f70b04 commit cf92b6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

boot/boot_serial/src/boot_serial.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ bs_set(struct boot_loader_state *state, char *buf, int len)
552552
#endif
553553

554554
rc = BOOT_HOOK_CALL(boot_read_image_header_hook,
555-
BOOT_HOOK_REGULAR, image_index, 1, &hdr);
555+
BOOT_HOOK_REGULAR, image_index, slot, &hdr);
556556
if (rc == BOOT_HOOK_REGULAR)
557557
{
558558
#ifdef MCUBOOT_SWAP_USING_OFFSET
@@ -568,7 +568,7 @@ bs_set(struct boot_loader_state *state, char *buf, int len)
568568

569569
BOOT_HOOK_CALL_FIH(boot_image_check_hook,
570570
FIH_BOOT_HOOK_REGULAR,
571-
fih_rc, image_index, 1);
571+
fih_rc, image_index, slot);
572572
if (FIH_EQ(fih_rc, FIH_BOOT_HOOK_REGULAR))
573573
{
574574
#ifdef MCUBOOT_ENC_IMAGES

0 commit comments

Comments
 (0)