debug: coredump: flash backend: print error if write fails

The loop in `coredump_flash_backend_buffer_output` might fail without
any alerts. This could be due to e.g. a too small coredump-partion.

Add a LOG_ERR if an error occurs.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
This commit is contained in:
Jeppe Odgaard 2023-10-25 11:39:10 +02:00 committed by Anas Nashif
parent 08bd1c5ec2
commit 530a3092fe

View file

@ -527,6 +527,7 @@ static void coredump_flash_backend_buffer_output(uint8_t *buf, size_t buflen)
&backend_ctx.stream_ctx,
tmp_buf, copy_sz, false);
if (backend_ctx.error != 0) {
LOG_ERR("Flash write error: %d", backend_ctx.error);
break;
}