r1173 - developers/werner

werner at sita.openmoko.org werner at sita.openmoko.org
Thu Mar 1 13:56:13 CET 2007


Author: werner
Date: 2007-03-01 13:56:09 +0100 (Thu, 01 Mar 2007)
New Revision: 1173

Added:
   developers/werner/openocd-wait-patiently.patch
Log:
src/target/target.c (handle_wait_halt_command): let user override the default
  maximum delay of 5 seconds



Added: developers/werner/openocd-wait-patiently.patch
===================================================================
--- developers/werner/openocd-wait-patiently.patch	2007-03-01 10:01:03 UTC (rev 1172)
+++ developers/werner/openocd-wait-patiently.patch	2007-03-01 12:56:09 UTC (rev 1173)
@@ -0,0 +1,21 @@
+--- openocd/src/target/target.c.orig	2007-03-01 09:20:31.000000000 -0300
++++ openocd/src/target/target.c	2007-03-01 09:33:18.000000000 -0300
+@@ -1223,7 +1223,17 @@
+ 	struct timeval timeout, now;
+ 	
+ 	gettimeofday(&timeout, NULL);
+-	timeval_add_time(&timeout, 5, 0);
++	if (!argc)
++		timeval_add_time(&timeout, 5, 0);
++	else {
++		char *end;
++
++		timeval_add_time(&timeout, strtoul(args[0], &end, 0), 0);
++		if (*end) {
++			command_print(cmd_ctx, "usage: wait_halt [seconds]");
++			return ERROR_OK;
++		}
++	}
+ 
+ 	command_print(cmd_ctx, "waiting for target halted...");
+ 





More information about the commitlog mailing list