Skip to content

Commit

Permalink
boot: bootutil: loader.c: Add check if has upgrade before pushing sta…
Browse files Browse the repository at this point in the history
…te change

Before pushing MCUBOOT_STATUS_UPGRADING, check if has_upgrade is true to ensure this is not pushed at every boot and only when needed.

Signed-off-by: Joseph Todd <[email protected]>
  • Loading branch information
juser19201 committed Dec 16, 2024
1 parent f2a6146 commit ad915c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,9 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
#endif

/* Trigger status change callback with upgrading status */
mcuboot_status_change(MCUBOOT_STATUS_UPGRADING);
if (has_upgrade) {
mcuboot_status_change(MCUBOOT_STATUS_UPGRADING);
}

/* Iterate over all the images. At this point there are no aborted swaps
* and the swap types are determined for each image. By the end of the loop
Expand Down

0 comments on commit ad915c6

Please sign in to comment.