This is an automated email from Gerrit.

Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/4886

-- gerrit

commit 66fd9237ea1ed3b4eccbf8abd279a61af9e288a0
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Thu Feb 7 09:56:10 2019 +0100

    command: fix the mode for command "jtag configure"
    
    Before commit 877cec20dca6e78f9f029f0f173879cda101a6c2 ("command:
    check command mode for native jim commands") all the jim commands
    were erroneously treated as they had mode COMMAND_ANY.
    The commit above fixes the code in order to check the mode and
    permit running the commands only if the mode is respected.
    
    Those jim commands that have incorrect mode were not detected nor
    fixes because the wrong mode was masked by the missing mode check.
    After the commit above, the wrong mode triggers error in several
    existing configuration scripts.
    A complete list of commands that now does not run anymore as
    CONFIG_ANY is reported in ticket 225, but most of them have the
    mode set correctly.
    At least two instances of command "jtag configure" have the wrong
    mode.
    
    Fix the mode to CONFIG_ANY for command "jtag configure" in files
    src/jtag/aice/aice_transport.c and src/jtag/tcl.c
    
    Change-Id: I3f96c5fd24d7d463712cbaf1295284fe0dc56b23
    Ticket: https://sourceforge.net/p/openocd/tickets/225/
    Reported-by: Bill Paul <wp...@users.sourceforge.net>
    Fixes: 877cec20dca6 ("command: check command mode for native jim commands")
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/jtag/aice/aice_transport.c b/src/jtag/aice/aice_transport.c
index 57c93f2..0658318 100644
--- a/src/jtag/aice/aice_transport.c
+++ b/src/jtag/aice/aice_transport.c
@@ -340,7 +340,7 @@ aice_transport_jtag_subcommand_handlers[] = {
        },
        {
                .name = "configure",
-               .mode = COMMAND_EXEC,
+               .mode = COMMAND_ANY,
                .jim_handler = jim_jtag_configure,
                .help = "Provide a Tcl handler for the specified "
                        "TAP event.",
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index e32f0ca..7683014 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -894,7 +894,7 @@ static const struct command_registration 
jtag_subcommand_handlers[] = {
        },
        {
                .name = "configure",
-               .mode = COMMAND_EXEC,
+               .mode = COMMAND_ANY,
                .jim_handler = jim_jtag_configure,
                .help = "Provide a Tcl handler for the specified "
                        "TAP event.",

-- 


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to