summaryrefslogtreecommitdiff
path: root/src/svf
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-15 05:57:37 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-17 11:40:06 -0800
commit2861877b32a7a2f4022a1c3d9b66c9b4879878ac (patch)
treed0f25f82899181b13241b2147d6ad7c72765542c /src/svf
parent23402315ce01071f30d7ec0c5ca7563ce41f1cc6 (diff)
downloadopenocd_libswd-2861877b32a7a2f4022a1c3d9b66c9b4879878ac.tar.gz
openocd_libswd-2861877b32a7a2f4022a1c3d9b66c9b4879878ac.tar.bz2
openocd_libswd-2861877b32a7a2f4022a1c3d9b66c9b4879878ac.tar.xz
openocd_libswd-2861877b32a7a2f4022a1c3d9b66c9b4879878ac.zip
command_handler: change 'cmd_ctx' to CMD_CTX
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
Diffstat (limited to 'src/svf')
-rw-r--r--src/svf/svf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c
index 45f34936..545bcf8f 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -310,7 +310,7 @@ COMMAND_HANDLER(handle_svf_command)
if ((CMD_ARGC < 1) || (CMD_ARGC > (1 + SVF_NUM_OF_OPTIONS)))
{
- command_print(cmd_ctx, "usage: svf <file> [quiet]");
+ command_print(CMD_CTX, "usage: svf <file> [quiet]");
return ERROR_FAIL;
}
@@ -333,7 +333,7 @@ COMMAND_HANDLER(handle_svf_command)
if ((svf_fd = open(CMD_ARGV[0], O_RDONLY)) < 0)
{
- command_print(cmd_ctx, "file \"%s\" not found", CMD_ARGV[0]);
+ command_print(CMD_CTX, "file \"%s\" not found", CMD_ARGV[0]);
// no need to free anything now
return ERROR_FAIL;
@@ -392,7 +392,7 @@ COMMAND_HANDLER(handle_svf_command)
while (ERROR_OK == svf_read_command_from_file(svf_fd))
{
- if (ERROR_OK != svf_run_command(cmd_ctx, svf_command_buffer))
+ if (ERROR_OK != svf_run_command(CMD_CTX, svf_command_buffer))
{
LOG_ERROR("fail to run command at line %d", svf_line_number);
ret = ERROR_FAIL;
@@ -410,7 +410,7 @@ COMMAND_HANDLER(handle_svf_command)
}
// print time
- command_print(cmd_ctx, "%lld ms used", timeval_ms() - time_ago);
+ command_print(CMD_CTX, "%lld ms used", timeval_ms() - time_ago);
free_all:
@@ -457,11 +457,11 @@ free_all:
if (ERROR_OK == ret)
{
- command_print(cmd_ctx, "svf file programmed successfully for %d commands", command_num);
+ command_print(CMD_CTX, "svf file programmed successfully for %d commands", command_num);
}
else
{
- command_print(cmd_ctx, "svf file programmed failed");
+ command_print(CMD_CTX, "svf file programmed failed");
}
return ret;