]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
menu: only timeout when menu is displayed
authorRob Herring <rob.herring@calxeda.com>
Wed, 28 Mar 2012 05:51:32 +0000 (05:51 +0000)
committerWolfgang Denk <wd@denx.de>
Thu, 21 Jun 2012 20:34:00 +0000 (22:34 +0200)
commit8594753ba0a7151e9352f1994b829f6c2d44a023
treeefd3c24a1843767db97cd5441193bd5d71ea1bee
parent172a3a82afd042b8cf43a0cd9720195985a46e3c
menu: only timeout when menu is displayed

Make the menu timeout apply only when prompt flag is set and after the
menu is displayed. This allows auto boot to work no matter whether prompt
is set or cleared. Use the default selection if the menu times out.

This also fixes the timeout value given to readline_into_buffer to be
seconds instead of 10th of seconds.

Old behavior:

if prompt
  display menu and wait for choice
else
  wait for timeout
  if key pressed
    display menu and wait for choice
  else
    exit command

New behavior:

if prompt
  display menu
  if key pressed
    wait for choice
  else
    boot default entry on timeout
else
  boot default entry

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
common/menu.c