boot/bootutil: added log on swap type used
Added LOG for informing which a swap type is performed.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
diff --git a/boot/bootutil/src/swap_move.c b/boot/bootutil/src/swap_move.c
index f968fae..6f33982 100644
--- a/boot/bootutil/src/swap_move.c
+++ b/boot/bootutil/src/swap_move.c
@@ -449,6 +449,8 @@
const struct flash_area *fap_sec;
int rc;
+ BOOT_LOG_INF("Starting swap using move algorithm.");
+
sz = 0;
g_last_idx = 0;
@@ -480,6 +482,9 @@
if (g_last_idx >= first_trailer_idx) {
BOOT_LOG_WRN("Not enough free space to run swap upgrade");
+ BOOT_LOG_WRN("required %d bytes but only %d are available",
+ (g_last_idx + 1) * sector_sz ,
+ first_trailer_idx * sector_sz);
bs->swap_type = BOOT_SWAP_TYPE_NONE;
return;
}