Before this fix, the "exit" command behaved differently
depending on where it was called from:
- "exit" in a telnet session: Session disconnected.
- "exit" in a Tcl session: Empty response sent but the
session remained connected.
- "exit" in a script (outside of Telnet or Tcl): OpenOCD
exited with code 0. Based on the help and documentation
"exit" was apparently not intended for these cases.
What's more, if "exit" is allowed in Tcl scripts,
user may confuse it with the Tcl's native "exit"
command that is not available in OpenOCD (it is
shadowed with this OpenOCD's "exit" command).
This fix makes the behavior of "exit" consistent:
- "exit" in a telnet session: Session disconnected
(no change).
- "exit" in a Tcl session: Session disconnected
(same as for telnet).
- "exit" in a script: Notify the user that "exit"
is deprecated outside of telnet/tcl but
still shut down OpenOCD (to preserve the original
behavior).
Update the documentation to make it very clear to users
when to use "exit" vs. "shutdown".
Change-Id: I790495330e1fa705b34097a1347fdc57aaa86de1
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9380
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Replace the FSF boilerplate with the SPDX tag.
The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.
Change-Id: I30cd66ac7d737f1973c68fdbb841ffcf00e917c4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7072
Tested-by: jenkins
Although the leak is negligible, the clean heap on exit will ease
valgrind testing.
Change-Id: I3a7a9c8e8dc7557aa51d0b9caa244537e5e7007d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4410
Tested-by: jenkins
A common use case seen in the wild is echoing a string of commands to an
existing openocd instance via netcat. The sequence of ; separated
commands can easily run over the line limit of only 256 chars.
Increasing this dramatically reduces surprises, at the expense of a tiny
amount of extra ram usage.
Change-Id: I2389d99d316a96b5fa03f0894b43c412308e12c4
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Reviewed-on: http://openocd.zylin.com/4132
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Changes from the flat namespace to heirarchical one. Instead of writing:
#include "server.h"
the following form should be used.
#include <server/server.h>
The exception is from .c files in the same directory.
- cleaned up headers to match rest of code
- added missing svn props for previously added files
git-svn-id: svn://svn.berlios.de/openocd/trunk@987 b42882b7-edfa-0310-969c-e2dbd0fdcd60