diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-12-01 19:52:00 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-12-02 13:26:26 -0800 |
commit | eaf10f69de969652d03742809b9c970158b90719 (patch) | |
tree | bb382e74018d2352a0ee05912d53c34b28ad6113 /src/openocd.c | |
parent | 34654359a918edae10ca7dd7ebc0a487fdf609a4 (diff) | |
download | riscv-openocd-eaf10f69de969652d03742809b9c970158b90719.zip riscv-openocd-eaf10f69de969652d03742809b9c970158b90719.tar.gz riscv-openocd-eaf10f69de969652d03742809b9c970158b90719.tar.bz2 |
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.
Diffstat (limited to 'src/openocd.c')
-rw-r--r-- | src/openocd.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/openocd.c b/src/openocd.c index 2043a92..1f45837 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" |