summaryrefslogtreecommitdiff
path: root/src/helper/command.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-09 15:22:05 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-09 15:22:05 +0000
commit66410d2537bad8e455e803d1868e7de6bf8cabbd (patch)
tree7f49709672e23ed31eacffd26cd7929d88c46650 /src/helper/command.c
parent525de2ed3d019bccffe3f060b3fee7baa5487425 (diff)
downloadopenocd_libswd-66410d2537bad8e455e803d1868e7de6bf8cabbd.tar.gz
openocd_libswd-66410d2537bad8e455e803d1868e7de6bf8cabbd.tar.bz2
openocd_libswd-66410d2537bad8e455e803d1868e7de6bf8cabbd.tar.xz
openocd_libswd-66410d2537bad8e455e803d1868e7de6bf8cabbd.zip
"flash banks" is now implemented in Tcl on top of "flash_banks". openocd_throw prefix is no longer required when executing OpenOCD commands from tcl.
git-svn-id: svn://svn.berlios.de/openocd/trunk@779 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/command.c')
-rw-r--r--src/helper/command.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 42ff199b..79d64ba7 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -465,25 +465,13 @@ int command_run_line_internal(command_context_t *context, char *line)
int command_run_line(command_context_t *context, char *line)
{
- int retval;
-
- if ((!context) || (!line))
- return ERROR_INVALID_ARGUMENTS;
-
- if ((retval = command_run_line_internal(context, line)) == ERROR_COMMAND_NOTFOUND)
- {
- /* If we can't find a command, then try the interpreter.
- * If there is no interpreter implemented, then this will
- * simply print a syntax error.
- *
- * These hooks were left in to reduce patch size for
- * wip to add scripting language.
- */
-
- return jim_command(context, line);
- }
-
- return retval;
+ /* if a command is unknown to the "unknown" proc in tcl/commands.tcl will
+ * redirect it to OpenOCD.
+ *
+ * This avoids having to type the "openocd" prefix and makes OpenOCD
+ * commands "native" to Tcl.
+ */
+ return jim_command(context, line);
}
int command_run_file(command_context_t *context, FILE *file, enum command_mode mode)