summaryrefslogtreecommitdiffstats
path: root/common/cmd_pxe.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2013-03-23 14:50:40 +0000
committerAnatolij Gustschin <agust@denx.de>2013-03-29 09:35:33 +0100
commitfc9d64ffcd94c1e22675830eae13956cc4fd822d (patch)
treef14a977c82a3fb1ee3f606d71f8c1ff5306ee1f1 /common/cmd_pxe.c
parent009d75ccc11d27b9a083375a88bb93cb746b4800 (diff)
downloadtalos-obmc-uboot-fc9d64ffcd94c1e22675830eae13956cc4fd822d.tar.gz
talos-obmc-uboot-fc9d64ffcd94c1e22675830eae13956cc4fd822d.zip
menu: Add support for user defined item choice function
Selecting menu items is currently done in menu_interactive_choice() by reading the user input strings from standard input. Extend menu_interactive_choice() to support user defined function for selecting menu items. This function and its argument can be specified when creating the menu. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'common/cmd_pxe.c')
-rw-r--r--common/cmd_pxe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index ee75db9685..2dbd49cbd6 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1280,7 +1280,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);
+ m = menu_create(cfg->title, cfg->timeout, cfg->prompt, label_print,
+ NULL, NULL);
if (!m)
return NULL;
OpenPOWER on IntegriCloud