diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-09 11:44:01 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-09 11:44:01 +0000 |
commit | 59ff8d24d84ad734ca470aa37e9516be806499c9 (patch) | |
tree | eb849b9e30295482f04be9121245c04599bdfc55 /src | |
parent | 5bbf2ae519c31b45e7609918a1bc36b849ba53f5 (diff) | |
download | openocd_libswd-59ff8d24d84ad734ca470aa37e9516be806499c9.tar.gz openocd_libswd-59ff8d24d84ad734ca470aa37e9516be806499c9.tar.bz2 openocd_libswd-59ff8d24d84ad734ca470aa37e9516be806499c9.tar.xz openocd_libswd-59ff8d24d84ad734ca470aa37e9516be806499c9.zip |
moved ioutil init to the right spot: before config scripts
git-svn-id: svn://svn.berlios.de/openocd/trunk@1311 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/ecosboard.c | 10 | ||||
-rw-r--r-- | src/helper/ioutil.c | 1 | ||||
-rw-r--r-- | src/openocd.c | 14 |
3 files changed, 18 insertions, 7 deletions
diff --git a/src/ecosboard.c b/src/ecosboard.c index 11b786cb..725a3f36 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -869,6 +869,8 @@ int add_default_dirs(void) return ERROR_OK; } +int ioutil_init(struct command_context_s *cmd_ctx); + int main(int argc, char *argv[]) { /* ramblockdevice will be the same address every time. The deflate app uses a buffer 16mBytes out, so we @@ -1001,6 +1003,14 @@ int main(int argc, char *argv[]) command_set_output_handler(cmd_ctx, configuration_output_handler, NULL); command_context_mode(cmd_ctx, COMMAND_CONFIG); +#if BUILD_IOUTIL + if (ioutil_init(cmd_ctx) != ERROR_OK) + { + return EXIT_FAILURE; + } +#endif + + #ifdef CYGPKG_PROFILE_GPROF register_command(cmd_ctx, NULL, "ecosboard_profile", eCosBoard_handle_eCosBoard_profile_command, COMMAND_ANY, NULL); diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c index 4711e341..9de1a691 100644 --- a/src/helper/ioutil.c +++ b/src/helper/ioutil.c @@ -601,6 +601,7 @@ static int zylinjtag_Jim_Command_ip(Jim_Interp *interp, int argc, freeifaddrs(ifp); #else Jim_Obj *tclOutput = Jim_NewStringObj(interp, "fixme!!!", 0); + LOG_ERROR("NOT IMPLEMENTED!!!"); #endif Jim_SetResult(interp, tclOutput); 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(); |