This is an automated email from Gerrit.

"zapb <d...@zapb.de>" just uploaded a new patch set to Gerrit, which you can 
find at https://review.openocd.org/c/openocd/+/8217

-- gerrit

commit 888a944132554047c520cd1294cd76b654b3b465
Author: Marc Schink <d...@zapb.de>
Date:   Mon Apr 15 21:02:43 2024 +0200

    transport: Remove echo in transport selection
    
    Do not echo the selected transport to avoid stray and confusing
    messages in the output of OpenOCD. For example, the "swd" line here:
    
      Open On-Chip Debugger 0.12.0+dev-00559-ge02f6c1b9-dirty
      Licensed under GNU GPL v2
      For bug reports, read
            http://openocd.org/doc/doxygen/bugs.html
      swd
      Info : Listening on port 6666 for tcl connections
      Info : Listening on port 4444 for telnet connections
    
    Change-Id: Ie85426c441289bbaa35615dbb7b53f0b5c46cfc0
    Signed-off-by: Marc Schink <d...@zapb.de>

diff --git a/doc/openocd.texi b/doc/openocd.texi
index 52a51c196f..c4388da60d 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -3702,9 +3702,6 @@ adapter's driver).
 If no transport has been selected and no @option{transport_name} is
 provided, @command{transport select} auto-selects the first transport
 supported by the debug adapter.
-
-@command{transport select} always returns the name of the session's selected
-transport, if any.
 @end deffn
 
 @subsection JTAG Transport
diff --git a/src/transport/transport.c b/src/transport/transport.c
index 81d3d583bc..bf306e7314 100644
--- a/src/transport/transport.c
+++ b/src/transport/transport.c
@@ -278,7 +278,6 @@ COMMAND_HANDLER(handle_transport_select)
        if (session) {
                if (!strcmp(session->name, CMD_ARGV[0])) {
                        LOG_WARNING("Transport \"%s\" was already selected", 
session->name);
-                       command_print(CMD, "%s", session->name);
                        return ERROR_OK;
                }
                command_print(CMD, "Can't change session's transport after the 
initial selection was made");
@@ -301,7 +300,6 @@ COMMAND_HANDLER(handle_transport_select)
                        int retval = transport_select(CMD_CTX, CMD_ARGV[0]);
                        if (retval != ERROR_OK)
                                return retval;
-                       command_print(CMD, "%s", session->name);
                        return ERROR_OK;
                }
        }

-- 

Reply via email to