forked from auracaster/openocd
target: add deprecated target name support
This enables us to change the target name without breaking any target scripts. Change-Id: I635f961e573264d3dab2560f3a803ef1986ccfde Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/919 Tested-by: jenkins
This commit is contained in:
@@ -4909,6 +4909,15 @@ static int target_create(Jim_GetOptInfo *goi)
|
||||
/* found */
|
||||
break;
|
||||
}
|
||||
|
||||
/* check for deprecated name */
|
||||
if (target_types[x]->deprecated_name) {
|
||||
if (0 == strcmp(cp, target_types[x]->deprecated_name)) {
|
||||
/* found */
|
||||
LOG_WARNING("target name is deprecated use: \'%s\'", target_types[x]->name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target_types[x] == NULL) {
|
||||
Jim_SetResultFormatted(goi->interp, "Unknown target type %s, try one of ", cp);
|
||||
|
||||
Reference in New Issue
Block a user