From: oharboe Date: Thu, 5 Mar 2009 06:55:35 +0000 (+0000) Subject: Nicolas Pitre fix "halt 0" to only halt and not to poll/wait afterward... X-Git-Tag: v0.2.0~1104 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=86c0f4cafc6fca5fae2b284cbbd3f44a288480c0;p=openocd Nicolas Pitre fix "halt 0" to only halt and not to poll/wait afterwards. This follows the intention in the docs. git-svn-id: svn://svn.berlios.de/openocd/trunk@1398 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- diff --git a/src/target/target.c b/src/target/target.c index 6a72c5b6..d2fb1c8a 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1759,6 +1759,16 @@ int handle_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **arg return retval; } + if (argc == 1) + { + int wait; + char *end; + + wait = strtoul(args[0], &end, 0); + if (!*end && !wait) + return ERROR_OK; + } + return handle_wait_halt_command(cmd_ctx, cmd, args, argc); }