diff options
author | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-02-19 20:04:57 +0000 |
---|---|---|
committer | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-02-19 20:04:57 +0000 |
commit | 95df797b2e711286e3909a7d25e36519d5a6e335 (patch) | |
tree | d1fe8a2be36e83050173289cf31b3daff52697a1 /src/helper/interpreter.c | |
parent | ee340df8417772b8c29a54ddf7b36556ec20d609 (diff) |
- add search paths via new arg -s (-search). Thanks Ted Roth
- updated docs for new command
git-svn-id: svn://svn.berlios.de/openocd/trunk@312 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/interpreter.c')
-rw-r--r-- | src/helper/interpreter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/helper/interpreter.c b/src/helper/interpreter.c index e5ce0f00..c5c38b83 100644 --- a/src/helper/interpreter.c +++ b/src/helper/interpreter.c @@ -22,6 +22,7 @@ #endif #include "interpreter.h" +#include "configuration.h" #include "binarybuffer.h" #include <stdlib.h> @@ -221,7 +222,8 @@ int handle_script_command(struct command_context_s *cmd_ctx, char *cmd, char **a if (argc != 1) command_print(cmd_ctx, "usage: script <file>"); - script_file = fopen(args[0], "r"); + script_file = open_file_from_path(cmd_ctx, args[0], "r"); + if (!script_file) { command_print(cmd_ctx, "couldn't open script file %s", args[0]); |