summaryrefslogtreecommitdiff
path: root/src/target/xscale.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-10 22:29:36 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:55:00 -0800
commita585bdf7269ce5c861c83ee3294ba1f074e9c877 (patch)
tree0b50307192186d4516609e9043be1be1dd3ebc2d /src/target/xscale.c
parent5b6df55a1e5e4c0f531bc336691bc7c9a6a0df87 (diff)
downloadopenocd_libswd-a585bdf7269ce5c861c83ee3294ba1f074e9c877.tar.gz
openocd_libswd-a585bdf7269ce5c861c83ee3294ba1f074e9c877.tar.bz2
openocd_libswd-a585bdf7269ce5c861c83ee3294ba1f074e9c877.tar.xz
openocd_libswd-a585bdf7269ce5c861c83ee3294ba1f074e9c877.zip
add CMD_NAME macro for command handlers
By introducing the CMD_NAME macro, this parameter may be integrated as args[-1] in command.[ch], without touching any other call sites.
Diffstat (limited to 'src/target/xscale.c')
-rw-r--r--src/target/xscale.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c
index 6f2d6ee3..e18d5916 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -3127,7 +3127,7 @@ COMMAND_HANDLER(xscale_handle_mmu_command)
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
@@ -3163,13 +3163,13 @@ COMMAND_HANDLER(xscale_handle_idcache_command)
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
- if (strcmp(cmd, "icache") == 0)
+ if (strcmp(CMD_NAME, "icache") == 0)
icache = 1;
- else if (strcmp(cmd, "dcache") == 0)
+ else if (strcmp(CMD_NAME, "dcache") == 0)
dcache = 1;
if (argc >= 1)
@@ -3302,7 +3302,7 @@ COMMAND_HANDLER(xscale_handle_trace_buffer_command)
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
@@ -3429,7 +3429,7 @@ COMMAND_HANDLER(xscale_handle_dump_trace_command)
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
@@ -3499,7 +3499,7 @@ COMMAND_HANDLER(xscale_handle_cp15)
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
uint32_t reg_no = 0;