From eea1bb4d309d2017570b29e94a4356e28a50d7e8 Mon Sep 17 00:00:00 2001 From: HAOUES Ahmed Date: Fri, 16 Jan 2026 15:08:59 +0100 Subject: [PATCH] flash: nor: keep Windows backslashes in flash list output Wrap the name field in braces when formatting the flash list Tcl structure so that Tcl does not interpret backslash escape sequences. This ensures Windows paths are preserved verbatim in the output and can be reliably matched in Tcl scripts. Fixes: 80fc9fabc66a ("flash: nor: rewrite command 'flash list' as COMMAND_HANDLER") Change-Id: Ibd0a4b292828f084122e4a02732dc69ac0885f3c Signed-off-by: HAOUES Ahmed Reviewed-on: https://review.openocd.org/c/openocd/+/9360 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 2e7e6a38f..add7df437 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -1460,7 +1460,7 @@ COMMAND_HANDLER(handle_flash_list) for (struct flash_bank *p = flash_bank_list(); p; p = p->next) { command_print(CMD, "{\n" - " name %s\n" + " name {%s}\n" " driver %s\n" " base " TARGET_ADDR_FMT "\n" " size 0x%" PRIx32 "\n"