summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-03-05 06:55:35 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-03-05 06:55:35 +0000
commit86c0f4cafc6fca5fae2b284cbbd3f44a288480c0 (patch)
tree842741e5bd58c20802533b07a88814268e6d0910 /src
parenta8bd749d4edfeee9832a75daa1ce3a519285d5b2 (diff)
downloadopenocd_libswd-86c0f4cafc6fca5fae2b284cbbd3f44a288480c0.tar.gz
openocd_libswd-86c0f4cafc6fca5fae2b284cbbd3f44a288480c0.tar.bz2
openocd_libswd-86c0f4cafc6fca5fae2b284cbbd3f44a288480c0.tar.xz
openocd_libswd-86c0f4cafc6fca5fae2b284cbbd3f44a288480c0.zip
Nicolas Pitre <nico@cam.org> 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
Diffstat (limited to 'src')
-rw-r--r--src/target/target.c10
1 files changed, 10 insertions, 0 deletions
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);
}