menu: don't bother going interactive with just one menu item
authorLeon Yu <leoyu@nvidia.com>
Fri, 21 Jun 2019 04:12:39 +0000 (12:12 +0800)
committerTom Rini <trini@konsulko.com>
Wed, 24 Jul 2019 17:16:29 +0000 (13:16 -0400)
commitdfaad8208f069f95d35f52c4cc69b1a05cd60f75
treee46c6a1303ef7cfee8c5e301e4c6b03e59b95542
parentbe683756f620349966e0ebb4a5e02e5ff03c8a8e
menu: don't bother going interactive with just one menu item

If there is only one menu item available, prompting user to enter
choice makes little sense and just causes unnecessary boot delay. This
change makes menu_get_choice return the only one item when there is no
other choices.

Signed-off-by: Leon Yu <leoyu@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Thierry Reding <treding@nvidia.com>
common/menu.c