forked from auracaster/openocd
command_context_t -> struct command_context
Remove misleading typedef and redundant suffix from struct command_context.
This commit is contained in:
@@ -650,7 +650,7 @@ int gdb_output_con(struct connection *connection, const char* line)
|
||||
return retval;
|
||||
}
|
||||
|
||||
int gdb_output(struct command_context_s *context, const char* line)
|
||||
int gdb_output(struct command_context *context, const char* line)
|
||||
{
|
||||
/* this will be dumped to the log and also sent as an O packet if possible */
|
||||
LOG_USER_N("%s", line);
|
||||
@@ -1556,7 +1556,7 @@ static int compare_bank (const void * a, const void * b)
|
||||
|
||||
int gdb_query_packet(struct connection *connection, struct target *target, char *packet, int packet_size)
|
||||
{
|
||||
command_context_t *cmd_ctx = connection->cmd_ctx;
|
||||
struct command_context *cmd_ctx = connection->cmd_ctx;
|
||||
struct gdb_connection *gdb_connection = connection->priv;
|
||||
|
||||
if (strstr(packet, "qRcmd,"))
|
||||
@@ -2371,7 +2371,7 @@ COMMAND_HANDLER(handle_gdb_breakpoint_override_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int gdb_register_commands(command_context_t *command_context)
|
||||
int gdb_register_commands(struct command_context *command_context)
|
||||
{
|
||||
register_command(command_context, NULL, "gdb_sync",
|
||||
handle_gdb_sync_command, COMMAND_ANY,
|
||||
|
||||
@@ -55,7 +55,7 @@ struct gdb_service
|
||||
};
|
||||
|
||||
int gdb_init(void);
|
||||
int gdb_register_commands(command_context_t *command_context);
|
||||
int gdb_register_commands(struct command_context *command_context);
|
||||
|
||||
#define ERROR_GDB_BUFFER_TOO_SMALL (-800)
|
||||
#define ERROR_GDB_TIMEOUT (-801)
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ static int shutdown_openocd = 0;
|
||||
/* set when using pipes rather than tcp */
|
||||
int server_use_pipes = 0;
|
||||
|
||||
int add_connection(struct service *service, command_context_t *cmd_ctx)
|
||||
int add_connection(struct service *service, struct command_context *cmd_ctx)
|
||||
{
|
||||
socklen_t address_size;
|
||||
struct connection *c, **p;
|
||||
@@ -288,7 +288,7 @@ int remove_services(void)
|
||||
extern void openocd_sleep_prelude(void);
|
||||
extern void openocd_sleep_postlude(void);
|
||||
|
||||
int server_loop(command_context_t *command_context)
|
||||
int server_loop(struct command_context *command_context)
|
||||
{
|
||||
struct service *service;
|
||||
|
||||
@@ -541,7 +541,7 @@ COMMAND_HANDLER(handle_shutdown_command)
|
||||
return ERROR_COMMAND_CLOSE_CONNECTION;
|
||||
}
|
||||
|
||||
int server_register_commands(command_context_t *context)
|
||||
int server_register_commands(struct command_context *context)
|
||||
{
|
||||
register_command(context, NULL, "shutdown",
|
||||
handle_shutdown_command, COMMAND_ANY,
|
||||
|
||||
+3
-3
@@ -42,7 +42,7 @@ struct connection
|
||||
{
|
||||
int fd;
|
||||
struct sockaddr_in sin;
|
||||
command_context_t *cmd_ctx;
|
||||
struct command_context *cmd_ctx;
|
||||
struct service *service;
|
||||
int input_pending;
|
||||
void *priv;
|
||||
@@ -77,9 +77,9 @@ int add_service(char *name, enum connection_type type, unsigned short port,
|
||||
int server_init(void);
|
||||
int server_quit(void);
|
||||
|
||||
int server_loop(command_context_t *command_context);
|
||||
int server_loop(struct command_context *command_context);
|
||||
|
||||
int server_register_commands(command_context_t *context);
|
||||
int server_register_commands(struct command_context *context);
|
||||
|
||||
/**
|
||||
* Defines an extended command handler function declaration to enable
|
||||
|
||||
@@ -175,7 +175,7 @@ COMMAND_HANDLER(handle_tcl_port_command)
|
||||
return CALL_COMMAND_HANDLER(server_port_command, &tcl_port);
|
||||
}
|
||||
|
||||
int tcl_register_commands(command_context_t *cmd_ctx)
|
||||
int tcl_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
register_command(cmd_ctx, NULL, "tcl_port",
|
||||
handle_tcl_port_command, COMMAND_CONFIG,
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
#include "server.h"
|
||||
|
||||
int tcl_init(void);
|
||||
int tcl_register_commands(command_context_t *cmd_ctx);
|
||||
int tcl_register_commands(struct command_context *cmd_ctx);
|
||||
|
||||
#endif /* _TCL_SERVER_H_ */
|
||||
|
||||
@@ -94,7 +94,7 @@ int telnet_outputline(struct connection *connection, const char *line)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int telnet_output(struct command_context_s *cmd_ctx, const char* line)
|
||||
int telnet_output(struct command_context *cmd_ctx, const char* line)
|
||||
{
|
||||
struct connection *connection = cmd_ctx->output_handler_priv;
|
||||
|
||||
@@ -198,7 +198,7 @@ int telnet_input(struct connection *connection)
|
||||
char buffer[TELNET_BUFFER_SIZE];
|
||||
char *buf_p;
|
||||
struct telnet_connection *t_con = connection->priv;
|
||||
command_context_t *command_context = connection->cmd_ctx;
|
||||
struct command_context *command_context = connection->cmd_ctx;
|
||||
|
||||
bytes_read = read_socket(connection->fd, buffer, TELNET_BUFFER_SIZE);
|
||||
|
||||
@@ -616,7 +616,7 @@ COMMAND_HANDLER(handle_exit_command)
|
||||
return ERROR_COMMAND_CLOSE_CONNECTION;
|
||||
}
|
||||
|
||||
int telnet_register_commands(command_context_t *command_context)
|
||||
int telnet_register_commands(struct command_context *command_context)
|
||||
{
|
||||
register_command(command_context, NULL, "exit",
|
||||
&handle_exit_command, COMMAND_EXEC,
|
||||
|
||||
@@ -69,6 +69,6 @@ struct telnet_service
|
||||
};
|
||||
|
||||
int telnet_init(char *banner);
|
||||
int telnet_register_commands(command_context_t *command_context);
|
||||
int telnet_register_commands(struct command_context *command_context);
|
||||
|
||||
#endif /* TELNET_SERVER_H */
|
||||
|
||||
Reference in New Issue
Block a user