diff options
author | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-18 04:44:28 +0000 |
---|---|---|
committer | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-18 04:44:28 +0000 |
commit | c977616cdad17ad74742ede8703f54e370c3947d (patch) | |
tree | 353069e20f067f73c3eba780cc53c393b26947c1 /src/target/etb.c | |
parent | cafad4969c306c87954c8bd681068932dae68a41 (diff) | |
download | riscv-openocd-c977616cdad17ad74742ede8703f54e370c3947d.zip riscv-openocd-c977616cdad17ad74742ede8703f54e370c3947d.tar.gz riscv-openocd-c977616cdad17ad74742ede8703f54e370c3947d.tar.bz2 |
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
Diffstat (limited to 'src/target/etb.c')
-rw-r--r-- | src/target/etb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/etb.c b/src/target/etb.c index 5f6e648..9a265ad 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -372,11 +372,11 @@ static int handle_etb_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; } |