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

View File

@@ -159,6 +159,12 @@ struct target
long long halt_issued_time; /* Note time when halt was issued */
};
/** Returns the instance-specific name of the specified target. */
static inline const char *target_name(struct target *target)
{
return target->cmd_name;
}
enum target_event
{
/* LD historical names