Skip to content

Commit 3fd4cd4

Browse files
sigvartmhnvlsianpu
authored andcommitted
bootutil: loader: Add post copy hook to swap function
Currently the post copy hook is only called from the `copy_region` function. However when another update method than `BOOT_UPGRADE_ONLY` is selected this function is not called. This adds post copy hook to the end of `boot_swap_image` when we know the swap is complete. Signed-off-by: Sigvart Hovland <[email protected]>
1 parent 6e116e4 commit 3fd4cd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

boot/bootutil/src/loader.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,8 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
13321332
boot_status_fails);
13331333
}
13341334
#endif
1335+
rc = BOOT_HOOK_CALL(boot_copy_region_post_hook, 0, BOOT_CURR_IMG(state),
1336+
BOOT_IMG_AREA(state, BOOT_PRIMARY_SLOT), size);
13351337

13361338
return 0;
13371339
}

0 commit comments

Comments
 (0)