summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-15 08:15:59 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-17 11:38:07 -0800
commit23402315ce01071f30d7ec0c5ca7563ce41f1cc6 (patch)
tree2b1cad0044d857844f7d6b35b5ffadd390594c9b /src/server
parent7bf1a86e473a12882bf6f71cb4d0d416394b69d4 (diff)
downloadopenocd_libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.tar.gz
openocd_libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.tar.bz2
openocd_libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.tar.xz
openocd_libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.zip
command_handler: change 'args' to CMD_ARGV
This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
Diffstat (limited to 'src/server')
-rw-r--r--src/server/gdb_server.c24
-rw-r--r--src/server/httpd.c4
-rw-r--r--src/server/server.c2
3 files changed, 15 insertions, 15 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index f5eb71da..716e1cfe 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -2272,18 +2272,18 @@ COMMAND_HANDLER(handle_gdb_memory_map_command)
{
if (CMD_ARGC == 1)
{
- if (strcmp(args[0], "enable") == 0)
+ if (strcmp(CMD_ARGV[0], "enable") == 0)
{
gdb_use_memory_map = 1;
return ERROR_OK;
}
- else if (strcmp(args[0], "disable") == 0)
+ else if (strcmp(CMD_ARGV[0], "disable") == 0)
{
gdb_use_memory_map = 0;
return ERROR_OK;
}
else
- LOG_WARNING("invalid gdb_memory_map configuration directive %s", args[0]);
+ LOG_WARNING("invalid gdb_memory_map configuration directive %s", CMD_ARGV[0]);
}
return ERROR_COMMAND_SYNTAX_ERROR;
@@ -2293,18 +2293,18 @@ COMMAND_HANDLER(handle_gdb_flash_program_command)
{
if (CMD_ARGC == 1)
{
- if (strcmp(args[0], "enable") == 0)
+ if (strcmp(CMD_ARGV[0], "enable") == 0)
{
gdb_flash_program = 1;
return ERROR_OK;
}
- else if (strcmp(args[0], "disable") == 0)
+ else if (strcmp(CMD_ARGV[0], "disable") == 0)
{
gdb_flash_program = 0;
return ERROR_OK;
}
else
- LOG_WARNING("invalid gdb_flash_program configuration directive: %s", args[0]);
+ LOG_WARNING("invalid gdb_flash_program configuration directive: %s", CMD_ARGV[0]);
}
return ERROR_COMMAND_SYNTAX_ERROR;
@@ -2314,18 +2314,18 @@ COMMAND_HANDLER(handle_gdb_report_data_abort_command)
{
if (CMD_ARGC == 1)
{
- if (strcmp(args[0], "enable") == 0)
+ if (strcmp(CMD_ARGV[0], "enable") == 0)
{
gdb_report_data_abort = 1;
return ERROR_OK;
}
- else if (strcmp(args[0], "disable") == 0)
+ else if (strcmp(CMD_ARGV[0], "disable") == 0)
{
gdb_report_data_abort = 0;
return ERROR_OK;
}
else
- LOG_WARNING("invalid gdb_report_data_abort configuration directive: %s", args[0]);
+ LOG_WARNING("invalid gdb_report_data_abort configuration directive: %s", CMD_ARGV[0]);
}
return ERROR_COMMAND_SYNTAX_ERROR;
@@ -2340,13 +2340,13 @@ COMMAND_HANDLER(handle_gdb_breakpoint_override_command)
} else if (CMD_ARGC == 1)
{
gdb_breakpoint_override = 1;
- if (strcmp(args[0], "hard") == 0)
+ if (strcmp(CMD_ARGV[0], "hard") == 0)
{
gdb_breakpoint_override_type = BKPT_HARD;
- } else if (strcmp(args[0], "soft") == 0)
+ } else if (strcmp(CMD_ARGV[0], "soft") == 0)
{
gdb_breakpoint_override_type = BKPT_SOFT;
- } else if (strcmp(args[0], "disable") == 0)
+ } else if (strcmp(CMD_ARGV[0], "disable") == 0)
{
gdb_breakpoint_override = 0;
}
diff --git a/src/server/httpd.c b/src/server/httpd.c
index d8659b09..1c5e6d2b 100644
--- a/src/server/httpd.c
+++ b/src/server/httpd.c
@@ -109,7 +109,7 @@ static int httpd_Jim_Command_writeform(Jim_Interp *interp, int argc,
{
if (argc != 3)
{
- Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
+ Jim_WrongNumArgs(interp, 1, argv, "method ?CMD_ARGV ...?");
return JIM_ERR;
}
char *name = (char*) Jim_GetString(argv[1], NULL);
@@ -156,7 +156,7 @@ httpd_Jim_Command_formfetch(Jim_Interp *interp,
{
if (argc != 2)
{
- Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
+ Jim_WrongNumArgs(interp, 1, argv, "method ?CMD_ARGV ...?");
return JIM_ERR;
}
char *name = (char*)Jim_GetString(argv[1], NULL);
diff --git a/src/server/server.c b/src/server/server.c
index 17a116d2..258c89bc 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -558,7 +558,7 @@ SERVER_PORT_COMMAND()
case 1:
{
uint16_t port;
- COMMAND_PARSE_NUMBER(u16, args[0], port);
+ COMMAND_PARSE_NUMBER(u16, CMD_ARGV[0], port);
*out = port;
break;
}