]> git.sur5r.net Git - openocd/commitdiff
Nicolas Pitre <nico@cam.org> fix "halt 0" to only halt and not to poll/wait afterward...
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 5 Mar 2009 06:55:35 +0000 (06:55 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 5 Mar 2009 06:55:35 +0000 (06:55 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1398 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/target.c

index 6a72c5b6d5f119269b16f91cf7b082c93d2784c7..d2fb1c8af4a52c683b45e249c819b7885d6b91b3 100644 (file)
@@ -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);
 }