telnet/auto-complete: hide deprecated and internal commands 95/6195/3
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 26 Apr 2021 12:44:48 +0000 (14:44 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 8 May 2021 08:48:15 +0000 (09:48 +0100)
For both:
- TCL proc that redirect deprecated commands to the new commands,
- TCL proc used internally and not supposed to be exposed to user,
add their name to the list of commands that should be hide by the
telnet auto-complete.

Change-Id: I05237c6a79334b7d2b151dfb129fb57b2f40bba6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6195
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
src/flash/startup.tcl
src/jtag/startup.tcl
src/server/startup.tcl
src/target/startup.tcl

index 7d9dbc7daf1d8ec8c8ae532ed223608023130eca..0a26da08bc266c54c77642a1715b28bea1ad1fd1 100644 (file)
@@ -6,6 +6,7 @@
 # optional args: verify, reset, exit and address
 #
 
+lappend _telnet_autocomplete_skip program_error
 proc program_error {description exit} {
        if {$exit == 1} {
                echo $description
index f1e69e591e8d59018243415696c53c8def614bef..c1eb2b2ee00aaf84aa4a3543485ae51fa936877a 100644 (file)
@@ -119,6 +119,7 @@ proc jtag_ntrst_assert_width args {
 #
 # FIXME phase these aids out after some releases
 #
+lappend _telnet_autocomplete_skip jtag_reset
 proc jtag_reset args {
        echo "DEPRECATED! use 'adapter \[de\]assert' not 'jtag_reset'"
        switch $args {
@@ -135,51 +136,61 @@ proc jtag_reset args {
        }
 }
 
+lappend _telnet_autocomplete_skip adapter_khz
 proc adapter_khz args {
        echo "DEPRECATED! use 'adapter speed' not 'adapter_khz'"
        eval adapter speed $args
 }
 
+lappend _telnet_autocomplete_skip adapter_name
 proc adapter_name args {
        echo "DEPRECATED! use 'adapter name' not 'adapter_name'"
        eval adapter name $args
 }
 
+lappend _telnet_autocomplete_skip adapter_nsrst_delay
 proc adapter_nsrst_delay args {
        echo "DEPRECATED! use 'adapter srst delay' not 'adapter_nsrst_delay'"
        eval adapter srst delay $args
 }
 
+lappend _telnet_autocomplete_skip adapter_nsrst_assert_width
 proc adapter_nsrst_assert_width args {
        echo "DEPRECATED! use 'adapter srst pulse_width' not 'adapter_nsrst_assert_width'"
        eval adapter srst pulse_width $args
 }
 
+lappend _telnet_autocomplete_skip interface
 proc interface args {
        echo "DEPRECATED! use 'adapter driver' not 'interface'"
        eval adapter driver $args
 }
 
+lappend _telnet_autocomplete_skip interface_transports
 proc  interface_transports args {
        echo "DEPRECATED! use 'adapter transports' not 'interface_transports'"
        eval adapter transports $args
 }
 
+lappend _telnet_autocomplete_skip interface_list
 proc  interface_list args {
        echo "DEPRECATED! use 'adapter list' not 'interface_list'"
        eval adapter list $args
 }
 
+lappend _telnet_autocomplete_skip ftdi_location
 proc ftdi_location args {
        echo "DEPRECATED! use 'adapter usb location' not 'ftdi_location'"
        eval adapter usb location $args
 }
 
+lappend _telnet_autocomplete_skip xds110_serial
 proc xds110_serial args {
        echo "DEPRECATED! use 'xds110 serial' not 'xds110_serial'"
        eval xds110 serial $args
 }
 
+lappend _telnet_autocomplete_skip xds110_supply_voltage
 proc xds110_supply_voltage args {
        echo "DEPRECATED! use 'xds110 supply' not 'xds110_supply_voltage'"
        eval xds110 supply $args
@@ -189,6 +200,7 @@ proc hla {cmd args} {
         tailcall "hla $cmd" {*}$args
 }
 
+lappend _telnet_autocomplete_skip "hla newtap"
 proc "hla newtap" {args} {
        echo "DEPRECATED! use 'swj_newdap' not 'hla newtap'"
        eval swj_newdap $args
index 04a1cc0469099f955c08c5fe1a57b338ee3242b7..447b57cc36e3f977d331afbc642ac934453150be 100644 (file)
@@ -9,6 +9,9 @@ proc ocd_gdb_restart {target_id} {
        reset halt
 }
 
+lappend _telnet_autocomplete_skip prevent_cps
+lappend _telnet_autocomplete_skip POST
+lappend _telnet_autocomplete_skip Host:
 proc prevent_cps {} {
        echo "Possible SECURITY ATTACK detected."
        echo "It looks like somebody is sending POST or Host: commands to OpenOCD."
index f128d3b5e2a470b6d1496ededc05f7bfe8c65e44..cee036697459b387ab6058befa04a13b532587e6 100644 (file)
@@ -208,31 +208,37 @@ proc init_board {} {
 }
 
 # smp_on/smp_off were already DEPRECATED in v0.11.0 through http://openocd.zylin.com/4615
+lappend _telnet_autocomplete_skip "aarch64 smp_on"
 proc "aarch64 smp_on" {args} {
        echo "DEPRECATED! use 'aarch64 smp on' not 'aarch64 smp_on'"
        eval aarch64 smp on $args
 }
 
+lappend _telnet_autocomplete_skip "aarch64 smp_off"
 proc "aarch64 smp_off" {args} {
        echo "DEPRECATED! use 'aarch64 smp off' not 'aarch64 smp_off'"
        eval aarch64 smp off $args
 }
 
+lappend _telnet_autocomplete_skip "cortex_a smp_on"
 proc "cortex_a smp_on" {args} {
        echo "DEPRECATED! use 'cortex_a smp on' not 'cortex_a smp_on'"
        eval cortex_a smp on $args
 }
 
+lappend _telnet_autocomplete_skip "cortex_a smp_off"
 proc "cortex_a smp_off" {args} {
        echo "DEPRECATED! use 'cortex_a smp off' not 'cortex_a smp_off'"
        eval cortex_a smp off $args
 }
 
+lappend _telnet_autocomplete_skip "mips_m4k smp_on"
 proc "mips_m4k smp_on" {args} {
        echo "DEPRECATED! use 'mips_m4k smp on' not 'mips_m4k smp_on'"
        eval mips_m4k smp on $args
 }
 
+lappend _telnet_autocomplete_skip "mips_m4k smp_off"
 proc "mips_m4k smp_off" {args} {
        echo "DEPRECATED! use 'mips_m4k smp off' not 'mips_m4k smp_off'"
        eval mips_m4k smp off $args

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)