Commit 098de833 authored by David Brown's avatar David Brown Committed by David Brown
Browse files

boot: Clean up errors during sim test

There are a few error messages printed by the boot code.  In a normal
platform, these are real errors, and really should print a message.
However, in the simulator, we intentionally create these scenarios, and
these errors only serve to distract from the rest of the test output.

Conditionalize the error prints based on whether we are running in the
simulator.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 6fa2d40d
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
@@ -538,8 +538,10 @@ boot_validate_slot(struct boot_loader_state *state, int slot,
             * continue booting from the primary slot.
             */
        }
#if !defined(__BOOTSIM__)
        BOOT_LOG_ERR("Image in the %s slot is not valid!",
                     (slot == BOOT_PRIMARY_SLOT) ? "primary" : "secondary");
#endif
        rc = -1;
        goto out;
    }
+2 −0
Changes for boot/bootutil/src/swap_move.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -162,7 +162,9 @@ swap_read_status_bytes(const struct flash_area *fap,
        /* This means there was an error writing status on the last
         * swap. Tell user and move on to validation!
         */
#if !defined(__BOOTSIM__)
        BOOT_LOG_ERR("Detected inconsistent status!");
#endif

#if !defined(MCUBOOT_VALIDATE_PRIMARY_SLOT)
        /* With validation of the primary slot disabled, there is no way
+2 −0
Changes for boot/bootutil/src/swap_scratch.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -130,7 +130,9 @@ swap_read_status_bytes(const struct flash_area *fap,
        /* This means there was an error writing status on the last
         * swap. Tell user and move on to validation!
         */
#if !defined(__BOOTSIM__)
        BOOT_LOG_ERR("Detected inconsistent status!");
#endif

#if !defined(MCUBOOT_VALIDATE_PRIMARY_SLOT)
        /* With validation of the primary slot disabled, there is no way