summaryrefslogtreecommitdiff
path: root/src/target/etm.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-25 16:38:08 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-25 16:38:08 -0800
commit2653b8030722c85393974cd6c0ebcdbd1ae27c72 (patch)
tree4cec04ac8f4f71678be236752b860724708144d8 /src/target/etm.c
parentb715a81f5b95144118d8f946d4191f1dc844783a (diff)
downloadopenocd+libswd-2653b8030722c85393974cd6c0ebcdbd1ae27c72.tar.gz
openocd+libswd-2653b8030722c85393974cd6c0ebcdbd1ae27c72.tar.bz2
openocd+libswd-2653b8030722c85393974cd6c0ebcdbd1ae27c72.tar.xz
openocd+libswd-2653b8030722c85393974cd6c0ebcdbd1ae27c72.zip
target: create and use target_name()
Several of the sites now using target_type_name() really ought to be using an instance-specific name. Create a function called target_name(), accessing the instance's own (command) name. Use it in several places that really should be displaying instance-specific names. Also in several places which were already doing so, but which had no wrapper to call. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/etm.c')
-rw-r--r--src/target/etm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target/etm.c b/src/target/etm.c
index 2ea7345d..520e22f6 100644
--- a/src/target/etm.c
+++ b/src/target/etm.c
@@ -1374,7 +1374,8 @@ COMMAND_HANDLER(handle_etm_config_command)
arm = target_to_arm(target);
if (!is_arm(arm)) {
command_print(CMD_CTX, "target '%s' is '%s'; not an ARM",
- target->cmd_name, target_type_name(target));
+ target_name(target),
+ target_type_name(target));
return ERROR_FAIL;
}