summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJens Scharsig <js_at_ng@scharsoft.de>2010-04-09 19:02:38 +0200
committerMichael BRANDT <michael.brandt@stericsson.com>2010-10-21 14:25:54 +0200
commitd78dda3712f7151b241b5f5f3fe2c947d83c6f3e (patch)
tree1ff5f7e47deaaff7b640014c8b80ccbb0003ab98 /common
parent988888dfb9e7fd873567dd24e2b2c7a5394ceb3d (diff)
FIX: watchdog timeout, while waiting for input
* add WATCHDOG_RESET to !tstc() loops * prevents watchdog timeout, while waiting for input, if CONFIG_BOOT_RETRY_TIME or CONFIG_SHOW_ACTIVITY defined Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de> Change-Id: I78493dddbae5293c4f0690ee05837c3818456c70 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/6817 Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com> Tested-by: Michael BRANDT <michael.brandt@stericsson.com>
Diffstat (limited to 'common')
-rw-r--r--common/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 1f559c140..e838770da 100644
--- a/common/main.c
+++ b/common/main.c
@@ -733,6 +733,7 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len)
while (!tstc()) { /* while no incoming data */
if (retry_time >= 0 && get_ticks() > endtime)
return (-2); /* timed out */
+ WATCHDOG_RESET();
}
#endif
@@ -1000,6 +1001,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)
while (!tstc()) { /* while no incoming data */
if (retry_time >= 0 && get_ticks() > endtime)
return (-2); /* timed out */
+ WATCHDOG_RESET();
}
#endif
WATCHDOG_RESET(); /* Trigger watchdog, if needed */
@@ -1008,6 +1010,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)
while (!tstc()) {
extern void show_activity(int arg);
show_activity(0);
+ WATCHDOG_RESET();
}
#endif
c = getc();