From 2653b8030722c85393974cd6c0ebcdbd1ae27c72 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 25 Nov 2009 16:38:08 -0800 Subject: 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 --- src/target/target.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/target/target.h') diff --git a/src/target/target.h b/src/target/target.h index 61bc68ae..15003c65 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -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 -- cgit v1.2.3