target: fix init_targets script handling

This fixes an issue when init is called before init_targets has been
executed.

Make sure init_targets is called before init.

Change-Id: Icd5bd4c2a8eea2e399d9de4e331a77560e9672ac
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/235
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
This commit is contained in:
Spencer Oliver
2011-11-23 23:39:57 +00:00
committed by Peter Stuge
parent 17322b729c
commit b462316699
2 changed files with 6 additions and 4 deletions

View File

@@ -292,10 +292,6 @@ static int openocd_thread(int argc, char *argv[], struct command_context *cmd_ct
if (ERROR_OK != ret)
return EXIT_FAILURE;
ret = command_run_line(cmd_ctx, "init_targets");
if (ERROR_OK != ret)
ret = EXIT_FAILURE;
if (init_at_startup)
{
ret = command_run_line(cmd_ctx, "init");