Skip to content

Commit 35e9931

Browse files
committed
bootutil: Add debug logging for boot status write
Adds debug level logging which shows the offset of where a sector swap status write is occurring at Signed-off-by: Jamie McCrae <[email protected]>
1 parent db9a7f5 commit 35e9931

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

boot/bootutil/src/loader.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ boot_write_status(const struct boot_loader_state *state, struct boot_status *bs)
470470
memset(buf, erased_val, BOOT_MAX_ALIGN);
471471
buf[0] = bs->state;
472472

473+
BOOT_LOG_DBG("writing swap status; fa_id=%d off=0x%lx (0x%lx)",
474+
flash_area_get_id(fap), (unsigned long)off,
475+
(unsigned long)flash_area_get_off(fap) + off);
476+
473477
rc = flash_area_write(fap, off, buf, align);
474478
if (rc != 0) {
475479
rc = BOOT_EFLASH;

0 commit comments

Comments
 (0)