X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fopenocd.c;h=379373cedba3da680d8e61bca0ecd2eb56984886;hp=b7781a6b6d37332693838815f662347bdcfd80ca;hb=833e7f5248778bcb31b4db1a1b91160995415203;hpb=5e229bbf87fbb5a809553526edf0186dd3dd5cf8 diff --git a/src/openocd.c b/src/openocd.c index b7781a6b6d..379373cedb 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -171,7 +171,7 @@ struct command_context *setup_command_handler(void) global_cmd_ctx = cmd_ctx = command_init(openocd_startup_tcl); - register_command(cmd_ctx, NULL, "version", handle_version_command, + COMMAND_REGISTER(cmd_ctx, NULL, "version", handle_version_command, COMMAND_EXEC, "show OpenOCD version"); /* register subsystem commands */ @@ -198,7 +198,7 @@ struct command_context *setup_command_handler(void) LOG_OUTPUT(OPENOCD_VERSION "\n"); - register_command(cmd_ctx, NULL, "init", handle_init_command, + COMMAND_REGISTER(cmd_ctx, NULL, "init", handle_init_command, COMMAND_ANY, "initializes target and servers - nop on subsequent invocations"); return cmd_ctx; @@ -278,7 +278,7 @@ int openocd_main(int argc, char *argv[]) httpd_stop(); #endif - unregister_all_commands(cmd_ctx); + unregister_all_commands(cmd_ctx, NULL); /* free commandline interface */ command_done(cmd_ctx);