projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor command registration
[fw/openocd]
/
src
/
openocd.c
diff --git
a/src/openocd.c
b/src/openocd.c
index 9edd611dd3787d814ffb54382eee03cb37528ed3..8e8ceac45eb8ece54df1b877b6438d1ae2e1631f 100644
(file)
--- a/
src/openocd.c
+++ b/
src/openocd.c
@@
-28,6
+28,7
@@
#include "config.h"
#endif
#include "config.h"
#endif
+#include "openocd.h"
#include "jtag.h"
#include "configuration.h"
#include "xsvf.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;
{
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");
register_command(cmd_ctx, NULL, "version", handle_version_command,
COMMAND_EXEC, "show OpenOCD version");
@@
-277,7
+278,7
@@
int openocd_main(int argc, char *argv[])
httpd_stop();
#endif
httpd_stop();
#endif
- unregister_all_commands(cmd_ctx);
+ unregister_all_commands(cmd_ctx
, NULL
);
/* free commandline interface */
command_done(cmd_ctx);
/* free commandline interface */
command_done(cmd_ctx);