Skip to content

Commit 7b333ff

Browse files
ahasztagnvlsianpu
authored andcommitted
[nrf noup] boot: Fix test failing with bootloader requests
nrf-squash! [nrf noup] boot: Improve bootloader request handling Setting "test" for image was failing when using bootloader requests due to an incorrect value being returned from send_boot_request. Signed-off-by: Artur Hadasz <[email protected]>
1 parent 25f4981 commit 7b333ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

boot/bootutil/src/bootutil_public.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,12 @@ send_boot_request(uint8_t magic, uint8_t image_ok, bool confirm, int image_id,
524524
} else {
525525
rc = 0;
526526
}
527-
#ifdef CONFIG_NCS_MCUBOOT_BOOT_REQUEST_TEST_SETS_BOOT_PREFERENCE
528527
} else {
528+
#ifdef CONFIG_NCS_MCUBOOT_BOOT_REQUEST_TEST_SETS_BOOT_PREFERENCE
529529
BOOT_LOG_DBG("Set image preference: %d, %d", image_id, slot_id);
530530
rc = boot_request_set_preferred_slot(image_id, slot_id);
531+
#else
532+
rc = 0;
531533
#endif /* CONFIG_NCS_MCUBOOT_BOOT_REQUEST_TEST_SETS_BOOT_PREFERENCE */
532534
}
533535
if (rc != 0) {

0 commit comments

Comments
 (0)