Commit f5454f16 authored by Joseph Todd's avatar Joseph Todd Committed by Jamie
Browse files

boot: bootutil: loader.c: Add check if has upgrade before pushing state 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: default avatarJoseph Todd <joseph.todd@lascar.co.uk>
parent 5b1c77dd
Loading
Loading
Loading
Loading
+2 −0
Changes for boot/bootutil/src/loader.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2255,7 +2255,9 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
#endif

    /* Trigger status change callback with upgrading status */
    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