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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9331
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Tomas Vanek
2026-01-03 12:09:20 +01:00
committed by Antonio Borneo
parent daaf48b96f
commit 8bd25e0329

View File

@@ -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);