diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-11 09:06:36 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-11 09:06:36 +0000 |
commit | 381f9a2e8aa1697e2af3c2bcad962dfcfe7348d7 (patch) | |
tree | 86e18dbf7d8f8d004971e40ef8666379160f10dc /src/helper/interpreter.c | |
parent | 0f2dfabd3b6123eb0cf9620e557e95ad76eaef91 (diff) | |
download | openocd_libswd-381f9a2e8aa1697e2af3c2bcad962dfcfe7348d7.tar.gz openocd_libswd-381f9a2e8aa1697e2af3c2bcad962dfcfe7348d7.tar.bz2 openocd_libswd-381f9a2e8aa1697e2af3c2bcad962dfcfe7348d7.tar.xz openocd_libswd-381f9a2e8aa1697e2af3c2bcad962dfcfe7348d7.zip |
.cfg files are now executed as Jim Tcl. Commands that terminate script w/error message.
git-svn-id: svn://svn.berlios.de/openocd/trunk@790 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/interpreter.c')
-rw-r--r-- | src/helper/interpreter.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/helper/interpreter.c b/src/helper/interpreter.c index 186d992e..8dbb7909 100644 --- a/src/helper/interpreter.c +++ b/src/helper/interpreter.c @@ -221,17 +221,7 @@ int handle_script_command(struct command_context_s *cmd_ctx, char *cmd, char **a if (argc != 1) return ERROR_COMMAND_SYNTAX_ERROR; - script_file = open_file_from_path (args[0], "r"); - - if (!script_file) - { - command_print(cmd_ctx, "couldn't open script file %s", args[0]); - return ERROR_OK; - } - command_run_file(cmd_ctx, script_file, cmd_ctx->mode); - - fclose(script_file); - - return ERROR_OK; + /* Run a tcl script file */ + return command_run_linef(cmd_ctx, "source [find {%s}]", args[0]); } |