pass startup_tcl to command_init

Removes external linkage from helper module, making the startup
code a parameter to a new command context's initialization routine.
This commit is contained in:
Zachary T Welch
2009-11-17 09:15:09 -08:00
parent cb7dbc1af4
commit 5e229bbf87
5 changed files with 11 additions and 5 deletions

View File

@@ -28,6 +28,7 @@
#include "config.h"
#endif
#include "openocd.h"
#include "jtag.h"
#include "configuration.h"
#include "xsvf.h"
@@ -168,7 +169,7 @@ struct command_context *setup_command_handler(void)
{
struct command_context *cmd_ctx;
global_cmd_ctx = cmd_ctx = command_init();
global_cmd_ctx = cmd_ctx = command_init(openocd_startup_tcl);
register_command(cmd_ctx, NULL, "version", handle_version_command,
COMMAND_EXEC, "show OpenOCD version");