summarylogtreecommitdiffstats
path: root/openocd-0.9.0-exit-clean.patch
diff options
context:
space:
mode:
authoryhfudev2015-06-13 13:05:50 -0400
committeryhfudev2015-06-13 13:05:50 -0400
commita43188ff3d131611725f9b2b3d89f25f13c07b3f (patch)
tree6c2873ed753a03ce34af5fc1de156d80bac399b9 /openocd-0.9.0-exit-clean.patch
parent2ba09416929f9e0e4e0e6210abac3b0b4dc4d3b7 (diff)
downloadaur-a43188ff3d131611725f9b2b3d89f25f13c07b3f.tar.gz
update for latest git version
Diffstat (limited to 'openocd-0.9.0-exit-clean.patch')
-rw-r--r--openocd-0.9.0-exit-clean.patch59
1 files changed, 0 insertions, 59 deletions
diff --git a/openocd-0.9.0-exit-clean.patch b/openocd-0.9.0-exit-clean.patch
deleted file mode 100644
index 4babc355a651..000000000000
--- a/openocd-0.9.0-exit-clean.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git a/src/helper/command.c b/src/helper/command.c
-index c29f113..d01c35e 100644
---- a/src/helper/command.c
-+++ b/src/helper/command.c
-@@ -118,10 +118,17 @@ 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 (return_retval != NULL)
-- *return_retval = retval;
-
-- return (retval == ERROR_OK) ? JIM_OK : JIM_ERR;
-+ 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;
-+ }
- }
-
- extern struct command_context *global_cmd_ctx;
-@@ -671,8 +678,7 @@ int command_run_line(struct command_context *context, char *line)
- }
- return retval;
- } else if (retcode == JIM_EXIT) {
-- /* ignore.
-- * exit(Jim_GetExitCode(interp)); */
-+ return ERROR_OK_EXIT;
- } else {
- const char *result;
- int reslen;
-diff --git a/src/helper/log.h b/src/helper/log.h
-index 7f9f32c..8a15b41 100644
---- a/src/helper/log.h
-+++ b/src/helper/log.h
-@@ -140,5 +140,6 @@ extern int debug_level;
- #define ERROR_FAIL (-4)
- #define ERROR_WAIT (-5)
-
-+#define ERROR_OK_EXIT (-6)
-
- #endif /* LOG_H */
-diff --git a/src/openocd.c b/src/openocd.c
-index b0dd21a..847c137 100644
---- a/src/openocd.c
-+++ b/src/openocd.c
-@@ -283,6 +283,8 @@ static int openocd_thread(int argc, char *argv[], struct command_context *cmd_ct
- return ERROR_FAIL;
-
- ret = parse_config_file(cmd_ctx);
-+ if (ret == ERROR_OK_EXIT)
-+ return ERROR_OK;
- if (ret != ERROR_OK)
- return ERROR_FAIL;
-