]> git.gag.com Git - fw/openocd/blobdiff - src/target/etm_dummy.c
Consolidate target selection code into single get_target() that handles both names...
[fw/openocd] / src / target / etm_dummy.c
index ee4c3e691aba98f3019fb736ee36d6fdc33df5f7..4b84fd32061b64279e424f2e848c703e20fe00ca 100644 (file)
@@ -31,11 +31,11 @@ static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, ch
        armv4_5_common_t *armv4_5;
        arm7_9_common_t *arm7_9;
 
-       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;
        }