forked from auracaster/openocd
Consolidate target selection code into single get_target() that handles both names and numbers. Provided by David Brownell <david-b@pacbell.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1804 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
+2
-3
@@ -1205,11 +1205,10 @@ static int handle_etm_config_command(struct command_context_s *cmd_ctx, char *cm
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
}
|
||||
|
||||
target = get_target_by_num(strtoul(args[0], NULL, 0));
|
||||
|
||||
target = get_target(args[0]);
|
||||
if (!target)
|
||||
{
|
||||
LOG_ERROR("target number '%s' not defined", args[0]);
|
||||
LOG_ERROR("target '%s' not defined", args[0]);
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user