From 8bd25e032999df48e80d8e9abce539b75d393bb9 Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Sat, 3 Jan 2026 12:09:20 +0100 Subject: [PATCH] flash/nor: do not report error as unknown The command "flash erase_check" reported any error code from flash driver erase_check method as "unknown" despite the error is usually described in a log message from the flash driver layer. E.g.: Error: Target not halted unknown error when checking erase state of flash bank #0 at 0x00000000 Reword the message not to mislead user. Change-Id: Ica768fa2924c107fa36d0f654d2c3149aa608dc4 Signed-off-by: Tomas Vanek Reviewed-on: https://review.openocd.org/c/openocd/+/9331 Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/flash/nor/tcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c index 517d9aca1..2e7e6a38f 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -192,7 +192,7 @@ COMMAND_HANDLER(handle_flash_erase_check_command) command_print(CMD, "successfully checked erase state"); else { command_print(CMD, - "unknown error when checking erase state of flash bank #%s at " + "Error: checking erase state of flash bank #%s at " TARGET_ADDR_FMT, CMD_ARGV[0], p->base);