Commit 99cecb5a authored by Jamie McCrae's avatar Jamie McCrae
Browse files

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: default avatarJamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit cf92b6f6)
parent 3519605c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -487,7 +487,7 @@ bs_set(struct boot_loader_state *state, char *buf, int len)
                }

                rc = BOOT_HOOK_CALL(boot_read_image_header_hook,
                                    BOOT_HOOK_REGULAR, image_index, 1, &hdr);
                                    BOOT_HOOK_REGULAR, image_index, slot, &hdr);
                if (rc == BOOT_HOOK_REGULAR)
                {
                    flash_area_read(fap, 0, &hdr, sizeof(hdr));
@@ -499,7 +499,7 @@ bs_set(struct boot_loader_state *state, char *buf, int len)

                    BOOT_HOOK_CALL_FIH(boot_image_check_hook,
                                       FIH_BOOT_HOOK_REGULAR,
                                       fih_rc, image_index, 1);
                                       fih_rc, image_index, slot);
                    if (FIH_EQ(fih_rc, FIH_BOOT_HOOK_REGULAR))
                    {
#ifdef MCUBOOT_ENC_IMAGES