aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/pxe.c4
-rw-r--r--common/menu.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/cmd/pxe.c b/cmd/pxe.c
index 7649d92..5609545 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -1453,8 +1453,8 @@ static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg)
/*
* Create a menu and add items for all the labels.
*/
- m = menu_create(cfg->title, cfg->timeout, cfg->prompt, label_print,
- NULL, NULL);
+ m = menu_create(cfg->title, DIV_ROUND_UP(cfg->timeout, 10),
+ cfg->prompt, label_print, NULL, NULL);
if (!m)
return NULL;
diff --git a/common/menu.c b/common/menu.c
index bf2b471..0f0a29a 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -194,8 +194,7 @@ static inline int menu_interactive_choice(struct menu *m, void **choice)
if (!m->item_choice) {
readret = cli_readline_into_buffer("Enter choice: ",
- cbuf,
- m->timeout / 10);
+ cbuf, m->timeout);
if (readret >= 0) {
choice_item = menu_item_by_key(m, cbuf);