From: <oh...@ma...> - 2009-01-09 12:44:13
|
Author: oharboe Date: 2009-01-09 12:44:01 +0100 (Fri, 09 Jan 2009) New Revision: 1311 Modified: trunk/src/ecosboard.c trunk/src/helper/ioutil.c trunk/src/openocd.c Log: moved ioutil init to the right spot: before config scripts Modified: trunk/src/ecosboard.c =================================================================== --- trunk/src/ecosboard.c 2009-01-09 11:43:15 UTC (rev 1310) +++ trunk/src/ecosboard.c 2009-01-09 11:44:01 UTC (rev 1311) @@ -869,6 +869,8 @@ 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 @@ 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); Modified: trunk/src/helper/ioutil.c =================================================================== --- trunk/src/helper/ioutil.c 2009-01-09 11:43:15 UTC (rev 1310) +++ trunk/src/helper/ioutil.c 2009-01-09 11:44:01 UTC (rev 1311) @@ -601,6 +601,7 @@ freeifaddrs(ifp); #else Jim_Obj *tclOutput = Jim_NewStringObj(interp, "fixme!!!", 0); + LOG_ERROR("NOT IMPLEMENTED!!!"); #endif Jim_SetResult(interp, tclOutput); Modified: trunk/src/openocd.c =================================================================== --- trunk/src/openocd.c 2009-01-09 11:43:15 UTC (rev 1310) +++ trunk/src/openocd.c 2009-01-09 11:44:01 UTC (rev 1311) @@ -139,13 +139,6 @@ 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 @@ 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(); |