From eaf10f69de969652d03742809b9c970158b90719 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Tue, 1 Dec 2009 19:52:00 -0800 Subject: remove BUILD_IOUTIL symbol Add ioutil_stubs.c to provide an empty ioutil_init() routine. Add ioutil.h to prevent applications from needing to declare it. Allows unconditionally calling that function during startup, and the resulting libocdhelper library API is now more stable. Prints a DEBUG message when the stub implementation is included. --- src/openocd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/openocd.c') diff --git a/src/openocd.c b/src/openocd.c index 2043a92c..1f458372 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -30,6 +30,7 @@ #include "openocd.h" #include "jtag.h" +#include "ioutil.h" #include "configuration.h" #include "xsvf.h" #include "svf.h" @@ -85,8 +86,6 @@ static int log_target_callback_event_handler(struct target *target, enum target_ return ERROR_OK; } -int ioutil_init(struct command_context *cmd_ctx); - static bool init_at_startup = true; COMMAND_HANDLER(handle_noinit_command) @@ -227,12 +226,8 @@ int openocd_main(int argc, char *argv[]) cmd_ctx = setup_command_handler(NULL); -#if BUILD_IOUTIL if (ioutil_init(cmd_ctx) != ERROR_OK) - { return EXIT_FAILURE; - } -#endif LOG_OUTPUT("For bug reports, read\n\t" "http://openocd.berlios.de/doc/doxygen/bugs.html" -- cgit v1.2.3