diff options
author | Alex Austin <alex.austin@spectrumdsi.com> | 2012-07-20 12:58:14 +0000 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2012-07-22 19:18:22 +0000 |
commit | 10fd274cfe5447fec8a4b8d3757787d086952deb (patch) | |
tree | 54479b0fe1df94dca29051470ec460c08043d853 /src/helper/command.c | |
parent | 5e4ee571cc10c58eb20497b3b869322cc0ce6c56 (diff) |
Revert "When calling openocd from a shell like this:"
This reverts commit e8641695c634109ebf5f1149923971770da1d28a
Original premise was wrong. Proper command is "shutdown", not "exit".
Change-Id: I07f5fe0dda9c24abe53628da986bfda0e406bb4a
Signed-off-by: Alex Austin <alex.austin@spectrumdsi.com>
Reviewed-on: http://openocd.zylin.com/757
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'src/helper/command.c')
-rw-r--r-- | src/helper/command.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 868d0952..ef0afa2b 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -118,15 +118,10 @@ static void command_log_capture_finish(struct log_capture_state *state) static int command_retval_set(Jim_Interp *interp, int retval) { int *return_retval = Jim_GetAssocData(interp, "retval"); - if (retval == ERROR_COMMAND_CLOSE_CONNECTION) { - if (return_retval != NULL) - *return_retval = 0; - return JIM_EXIT; - } else { - if (return_retval != NULL) - *return_retval = retval; - return (retval == ERROR_OK) ? JIM_OK : JIM_ERR; - } + if (return_retval != NULL) + *return_retval = retval; + + return (retval == ERROR_OK) ? JIM_OK : JIM_ERR; } extern struct command_context *global_cmd_ctx; @@ -676,7 +671,8 @@ int command_run_line(struct command_context *context, char *line) } return retval; } else if (retcode == JIM_EXIT) { - return ERROR_OK_EXIT; + /* ignore. + * exit(Jim_GetExitCode(interp)); */ } else { const char *result; int reslen; |