common: add possibility for readline_into_buffer timeout
add possibility to add a timeout when reading a line
into a buffer.
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
diff --git a/common/menu.c b/common/menu.c
index 5e0817c..3b1e0d0 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -222,7 +222,8 @@
menu_display(m);
- readret = readline_into_buffer("Enter choice: ", cbuf);
+ readret = readline_into_buffer("Enter choice: ", cbuf,
+ m->timeout);
if (readret >= 0) {
choice_item = menu_item_by_key(m, cbuf);