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>
This commit is contained in:
David Brownell
2009-11-25 16:38:08 -08:00
parent b715a81f5b
commit 2653b80307
5 changed files with 34 additions and 24 deletions
+2 -1
View File
@@ -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;
}