]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common, menu: do not trigger timeout again, if a line is read
authorHeiko Schocher <hs@denx.de>
Mon, 16 Jan 2012 22:24:29 +0000 (22:24 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sun, 12 Feb 2012 09:11:24 +0000 (10:11 +0100)
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Jason Hobbs <jason.hobbs@calxeda.com>
Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
common/menu.c

index 754a9f9d06a1ecf7e4847689964dd383e7d457aa..aa16c9a199d772f7bd9971e401efdb883bf06895 100644 (file)
@@ -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;