summaryrefslogtreecommitdiff
path: root/common/menu.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2012-01-16 22:24:29 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-02-12 10:11:24 +0100
commitfc4fa6a16db3f5c5671b4f3d32359fa416542cd2 (patch)
treef0ca8c70c57be3fe411963fb6faf6a2cfdcc1798 /common/menu.c
parent317d6c57d5e9bc9d363df8e0e395058b5985882e (diff)
downloadu-boot-fc4fa6a16db3f5c5671b4f3d32359fa416542cd2.tar.gz
common, menu: do not trigger timeout again, if a line is read
Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Jason Hobbs <jason.hobbs@calxeda.com> Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
Diffstat (limited to 'common/menu.c')
-rw-r--r--common/menu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/menu.c b/common/menu.c
index 754a9f9d06..aa16c9a199 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -236,8 +236,10 @@ static inline int menu_interactive_choice(struct menu *m, void **choice)
if (readret >= 0) {
choice_item = menu_item_by_key(m, cbuf);
- if (!choice_item)
+ if (!choice_item) {
printf("%s not found\n", cbuf);
+ m->timeout = 0;
+ }
} else {
puts("^C\n");
return -EINTR;