target: create and use target_name()
[fw/openocd] / src / target / target.h
index 61bc68aefd22d910b937142aa8998539c090dd78..15003c654288737d884c275a44be385b136369fa 100644 (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