X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fopenocd.c;h=1105d2a4366a0d8c177eae42a67a4ecf307bdc6f;hb=bf1e9a83c877f1439fe0e7b170ba897e11d08b1b;hp=b6dc010e5844f3f27a4239ce19d3a7390db62db9;hpb=1527272fb21beee7839335ea5587e879163d2ed1;p=openocd.git diff --git a/src/openocd.c b/src/openocd.c index b6dc010e58..1105d2a436 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -62,7 +62,6 @@ COMMAND_HANDLER(handle_version_command) return ERROR_OK; } - static int log_target_callback_event_handler(struct target *target, enum target_event event, void *priv) { switch (event) @@ -255,13 +254,15 @@ int openocd_main(int argc, char *argv[]) "http://openocd.berlios.de/doc/doxygen/bugs.html" "\n"); - command_context_mode(cmd_ctx, COMMAND_CONFIG); command_set_output_handler(cmd_ctx, configuration_output_handler, NULL); if (parse_cmdline_args(cmd_ctx, argc, argv) != ERROR_OK) return EXIT_FAILURE; + if (server_preinit() != ERROR_OK) + return EXIT_FAILURE; + ret = parse_config_file(cmd_ctx); if (ret != ERROR_OK) return EXIT_FAILURE;