From 445da543d8db868466dcef7e23f75b3c2b54bc72 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Tue, 1 Dec 2009 08:42:53 +0100 Subject: zy1000: keep up with latest changes to command handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keep up with Jim Tcl interpreter creation cleanup. Signed-off-by: Øyvind Harboe --- src/ecosboard.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/ecosboard.c') diff --git a/src/ecosboard.c b/src/ecosboard.c index 5588934a..36e807ef 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -80,6 +80,7 @@ #include #include +#include #ifdef CYGPKG_HAL_NIOS2 #define ZY1000_SER_DEV "/dev/uart_0" @@ -505,8 +506,6 @@ static void zylinjtag_startNetwork(void) cyg_httpd_init_tcl_interpreter(); - interp = httpstate.jim_interp; - Jim_CreateCommand(httpstate.jim_interp, "log", zylinjtag_Jim_Command_log, NULL, NULL); Jim_CreateCommand(httpstate.jim_interp, "zy1000_reboot", @@ -933,8 +932,6 @@ bool logAllToSerial = false; int boolParam(char *var); -struct command_context *setup_command_handler(void); - static const char *zylin_config_dir="/config/settings"; static int add_default_dirs(void) @@ -1078,7 +1075,8 @@ int main(int argc, char *argv[]) /* initialize commandline interface */ struct command_context * cmd_ctx; - cmd_ctx = setup_command_handler(); + struct command_context *setup_command_handler(Jim_Interp *interp); + cmd_ctx = setup_command_handler(httpstate.jim_interp); command_set_output_handler(cmd_ctx, configuration_output_handler, NULL); command_context_mode(cmd_ctx, COMMAND_CONFIG); @@ -1095,7 +1093,7 @@ int main(int argc, char *argv[]) COMMAND_ANY, NULL); #endif - Jim_CreateCommand(interp, "uart", zylinjtag_Jim_Command_uart, NULL, NULL); + Jim_CreateCommand(httpstate.jim_interp, "uart", zylinjtag_Jim_Command_uart, NULL, NULL); log_init(); -- cgit v1.2.3