X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fopenocd.c;h=014433c76f1600e63a22125c746ea449f291466c;hb=a98e1094a0443fac738e86ba314bc69879f84db8;hp=12d219b0863f985a81f6bfdefb6f7b1dd6c8932d;hpb=47d044934727c3d5a57658ddd324b407dd73860a;p=openocd.git diff --git a/src/openocd.c b/src/openocd.c index 12d219b086..014433c76f 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -118,6 +118,8 @@ static int log_target_callback_event_handler(struct target_s *target, enum targe return ERROR_OK; } +int ioutil_init(struct command_context_s *cmd_ctx); + /* OpenOCD can't really handle failure of this command. Patches welcome! :-) */ int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { @@ -130,6 +132,13 @@ 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");