diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2014-01-09 11:59:37 -0500 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2015-02-22 17:56:16 +0000 |
commit | 41124ea992b383f214d7a34766ae3c6cac74428c (patch) | |
tree | 3299670b6c5d9718627d15aa8feeb1b03541b78e /src | |
parent | 10331d20074c4a8644919deaf9de172d9d7ad6ae (diff) | |
download | riscv-openocd-41124ea992b383f214d7a34766ae3c6cac74428c.zip riscv-openocd-41124ea992b383f214d7a34766ae3c6cac74428c.tar.gz riscv-openocd-41124ea992b383f214d7a34766ae3c6cac74428c.tar.bz2 |
Remove long-deprecated "target count" and "target number" commands.
Given that the manual states that these two subcommands are
deprecated and were scheduled to be removed back in 2010,
remove them and the corresponding documentation from the
manual.
Change-Id: Iaac633349d7fcb8b7f964109c7d26dd0cc5fc233
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1860
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/target.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/target/target.c b/src/target/target.c index 9f12704..c87c889 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -5333,55 +5333,6 @@ static int jim_target_create(Jim_Interp *interp, int argc, Jim_Obj *const *argv) return target_create(&goi); } -static int jim_target_number(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - Jim_GetOptInfo goi; - Jim_GetOpt_Setup(&goi, interp, argc - 1, argv + 1); - - /* It's OK to remove this mechanism sometime after August 2010 or so */ - LOG_WARNING("don't use numbers as target identifiers; use names"); - if (goi.argc != 1) { - Jim_SetResultFormatted(goi.interp, "usage: target number <number>"); - return JIM_ERR; - } - jim_wide w; - int e = Jim_GetOpt_Wide(&goi, &w); - if (e != JIM_OK) - return JIM_ERR; - - struct target *target; - for (target = all_targets; NULL != target; target = target->next) { - if (target->target_number != w) - continue; - - Jim_SetResultString(goi.interp, target_name(target), -1); - return JIM_OK; - } - { - Jim_Obj *wObj = Jim_NewIntObj(goi.interp, w); - Jim_SetResultFormatted(goi.interp, - "Target: number %#s does not exist", wObj); - Jim_FreeNewObj(interp, wObj); - } - return JIM_ERR; -} - -static int jim_target_count(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - if (argc != 1) { - Jim_WrongNumArgs(interp, 1, argv, "<no parameters>"); - return JIM_ERR; - } - unsigned count = 0; - struct target *target = all_targets; - while (NULL != target) { - target = target->next; - count++; - } - Jim_SetResult(interp, Jim_NewIntObj(interp, count)); - return JIM_OK; -} - static const struct command_registration target_subcommand_handlers[] = { { .name = "init", @@ -5417,21 +5368,6 @@ static const struct command_registration target_subcommand_handlers[] = { .help = "Returns the names of all targets as a list of strings", }, { - .name = "number", - .mode = COMMAND_ANY, - .jim_handler = jim_target_number, - .usage = "number", - .help = "Returns the name of the numbered target " - "(DEPRECATED)", - }, - { - .name = "count", - .mode = COMMAND_ANY, - .jim_handler = jim_target_count, - .help = "Returns the number of targets as an integer " - "(DEPRECATED)", - }, - { .name = "smp", .mode = COMMAND_ANY, .jim_handler = jim_target_smp, |