projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Consolidate target selection code into single get_target() that handles both names...
[fw/openocd]
/
src
/
target
/
xscale.c
diff --git
a/src/target/xscale.c
b/src/target/xscale.c
index abdbe866905564a2efbe3dabf86708d3cd4f27c9..3947da0b49974180f1622dbef347e4f1c6596eb7 100644
(file)
--- a/
src/target/xscale.c
+++ b/
src/target/xscale.c
@@
-3147,9
+3147,9
@@
int xscale_handle_debug_handler_command(struct command_context_s *cmd_ctx, char
return ERROR_OK;
}
return ERROR_OK;
}
- if ((target = get_target
_by_num(strtoul(args[0], NULL, 0)
)) == NULL)
+ if ((target = get_target
(args[0]
)) == NULL)
{
{
- LOG_ERROR("
no target '%s' configur
ed", args[0]);
+ LOG_ERROR("
target '%s' not defin
ed", args[0]);
return ERROR_FAIL;
}
return ERROR_FAIL;
}
@@
-3187,9
+3187,10
@@
int xscale_handle_cache_clean_address_command(struct command_context_s *cmd_ctx,
return ERROR_COMMAND_SYNTAX_ERROR;
}
return ERROR_COMMAND_SYNTAX_ERROR;
}
- if ((target = get_target_by_num(strtoul(args[0], NULL, 0))) == NULL)
+ target = get_target(args[0]);
+ if (target == NULL)
{
{
- LOG_ERROR("
no target '%s' configur
ed", args[0]);
+ LOG_ERROR("
target '%s' not defin
ed", args[0]);
return ERROR_FAIL;
}
return ERROR_FAIL;
}