Consolidate target selection code into single get_target() that handles both names...
[fw/openocd] / src / target / etb.c
index 5f6e648e8c4104f1e004d8237542d9c7ca024ec7..9a265ad5ab4fd462037d831713023c75ef7c4a91 100644 (file)
@@ -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;
        }