diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-20 11:26:35 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 21:37:29 -0800 |
commit | 833e7f5248778bcb31b4db1a1b91160995415203 (patch) | |
tree | 7d5d5fa143b74f4989cc3226a0958e983cb1d2b5 /src/server | |
parent | f7e1f2df74b599903a6fb2d2ace94c3f1ef06097 (diff) | |
download | openocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.tar.gz openocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.tar.bz2 openocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.tar.xz openocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.zip |
use COMMAND_REGISTER macro
Replaces direct calls to register_command() with a macro, to allow
its parameters to be changed and callers updated in phases.
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 12 | ||||
-rw-r--r-- | src/server/server.c | 2 | ||||
-rw-r--r-- | src/server/tcl_server.c | 2 | ||||
-rw-r--r-- | src/server/telnet_server.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 21dc24c9..be1f8dbc 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2328,23 +2328,23 @@ COMMAND_HANDLER(handle_gdb_breakpoint_override_command) int gdb_register_commands(struct command_context *command_context) { - register_command(command_context, NULL, "gdb_sync", + COMMAND_REGISTER(command_context, NULL, "gdb_sync", handle_gdb_sync_command, COMMAND_ANY, "next stepi will return immediately allowing GDB to " "fetch register state without affecting target state"); - register_command(command_context, NULL, "gdb_port", + COMMAND_REGISTER(command_context, NULL, "gdb_port", handle_gdb_port_command, COMMAND_ANY, "daemon configuration command gdb_port"); - register_command(command_context, NULL, "gdb_memory_map", + COMMAND_REGISTER(command_context, NULL, "gdb_memory_map", handle_gdb_memory_map_command, COMMAND_CONFIG, "enable or disable memory map"); - register_command(command_context, NULL, "gdb_flash_program", + COMMAND_REGISTER(command_context, NULL, "gdb_flash_program", handle_gdb_flash_program_command, COMMAND_CONFIG, "enable or disable flash program"); - register_command(command_context, NULL, "gdb_report_data_abort", + COMMAND_REGISTER(command_context, NULL, "gdb_report_data_abort", handle_gdb_report_data_abort_command, COMMAND_CONFIG, "enable or disable reporting data aborts"); - register_command(command_context, NULL, "gdb_breakpoint_override", + COMMAND_REGISTER(command_context, NULL, "gdb_breakpoint_override", handle_gdb_breakpoint_override_command, COMMAND_EXEC, "hard/soft/disable - force type of breakpoint " "used by gdb 'break' commands."); diff --git a/src/server/server.c b/src/server/server.c index b28aa500..5be13166 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -541,7 +541,7 @@ COMMAND_HANDLER(handle_shutdown_command) int server_register_commands(struct command_context *context) { - register_command(context, NULL, "shutdown", + COMMAND_REGISTER(context, NULL, "shutdown", handle_shutdown_command, COMMAND_ANY, "shut the server down"); diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c index 40a0428d..a12176ee 100644 --- a/src/server/tcl_server.c +++ b/src/server/tcl_server.c @@ -177,7 +177,7 @@ COMMAND_HANDLER(handle_tcl_port_command) int tcl_register_commands(struct command_context *cmd_ctx) { - register_command(cmd_ctx, NULL, "tcl_port", + COMMAND_REGISTER(cmd_ctx, NULL, "tcl_port", handle_tcl_port_command, COMMAND_CONFIG, "port on which to listen for incoming TCL syntax"); return ERROR_OK; diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index 46d438e0..c52119da 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -618,11 +618,11 @@ COMMAND_HANDLER(handle_exit_command) int telnet_register_commands(struct command_context *command_context) { - register_command(command_context, NULL, "exit", + COMMAND_REGISTER(command_context, NULL, "exit", &handle_exit_command, COMMAND_EXEC, "exit telnet session"); - register_command(command_context, NULL, "telnet_port", + COMMAND_REGISTER(command_context, NULL, "telnet_port", &handle_telnet_port_command, COMMAND_ANY, "port on which to listen for incoming telnet connections"); |