summaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/openocd.c')
-rw-r--r--src/openocd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/openocd.c b/src/openocd.c
index e46f62d2..df4f8a9f 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -139,13 +139,6 @@ int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **arg
atexit(exit_handler);
-#if BUILD_IOUTIL
- if (ioutil_init(cmd_ctx) != ERROR_OK)
- {
- return ERROR_FAIL;
- }
-#endif
-
if (target_init(cmd_ctx) != ERROR_OK)
return ERROR_FAIL;
LOG_DEBUG("target init complete");
@@ -251,6 +244,13 @@ int openocd_main(int argc, char *argv[])
cmd_ctx = setup_command_handler();
+#if BUILD_IOUTIL
+ if (ioutil_init(cmd_ctx) != ERROR_OK)
+ {
+ return EXIT_FAILURE;
+ }
+#endif
+
LOG_OUTPUT("\n\nBUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS\n\n\n");
print_version();