aboutsummaryrefslogtreecommitdiff
path: root/include/menu.h
AgeCommit message (Collapse)AuthorFilesLines
2023-10-11expo: Support handling any key in ceditSimon Glass1-1/+6
At present cedit only supports menu keys. For textline objects we need to insert normal ASCII characters. We also need to handle backspace, which is ASCII 9. In fact, expo does not make use of all the menu keys, so partition them accordingly and update the logic to support normal ASCII characters, too. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10eficonfig: CTRL+S to save the boot orderMasahisa Kojima1-0/+1
The change boot order menu in eficonfig can have at most INT_MAX lines and it is troublesome to scroll down to the "Save" entry. This commit assigns CTRL+S to save the boot order. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-16menu: Factor out menu-keypress decodingSimon Glass1-0/+10
Move this code into a separate function so that it can be used in the new VBE menu. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Make use of CLI character processingSimon Glass1-2/+5
Avoid duplicating some of the escape-sequence processing here and use the CLI function instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Update bootmenu_loop() to return the codeSimon Glass1-6/+5
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Update bootmenu_autoboot_loop() to return the codeSimon Glass1-4/+3
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Rename KEY_... to BKEY_...Simon Glass1-16/+16
This enum values conflict with linux/input.h so rename them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootmenu: Add a few commentsSimon Glass1-0/+42
The behaviour of these two functions is completely undocumented. Add some notes so the poor, suffering dev can figure out what is going on. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-14menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handlingMasahisa Kojima1-0/+3
This is preparation to support menu-driven UEFI BootOrder variable updated by KEY_PLUS, KEY_MINUS and KEY_SPACE. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-05-07bootmenu: factor out the user input handlingMasahisa Kojima1-0/+20
This commit moves the user input handling from cmd/bootmenu.c to common/menu.c to reuse it from other modules. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-19doc: replace @return by Return:Heinrich Schuchardt1-1/+1
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2020-05-07menu: add support for client defined statusline functionThirupathaiah Annapureddy1-1/+1
Currently displaying status line is done in a weak function menu_display_statusline(). bootmenu.c overrides the weak default function. It calls menu_default_choice() and interprets the data as struct bootmenu_entry. pxe boot also uses common menu code for pxe menus. If there is a system that enables both bootmenu and pxe, menu_display_statusline() defined in bootmenu.c will be called and it will interpret struct pxe_label as struct bootmenu_entry. This leads to data aborts and pxe menu corruptions. This patch adds support for client defined statusline function to resolve the above bug. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
2019-08-02autoboot: Add comments for menu_show()Simon Glass1-2/+15
Add comments for this function. Also remove the #ifdef around it so that it can be called from 'if (IS_ENABLED(...))'. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-02autoboot: Rename CONFIG_MENU_SHOW to include AUTOBOOTSimon Glass1-1/+1
Rename this option to CONFIG_AUTOBOOT_MENU_SHOW this it relates to the autoboot functionality. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-12/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-03-29menu: export menu_default_choice() functionAnatolij Gustschin1-0/+1
Checking the default menu item and obtaining its data can be useful in custom menu code. Export menu_default_choice() function which serves this purpose. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-29menu: Add support for user defined item choice functionPali Rohár1-1/+3
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>
2012-02-12common, menu: show menu on startup if CONFIG_MENU_SHOW is definedHeiko Schocher1-0/+3
show a menu on startup instead running the shell. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Jason Hobbs <jason.hobbs@calxeda.com> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
2012-02-12common, menu: add statusline supportHeiko Schocher1-0/+1
add the possibility to show a statusline when printing a menu Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Jason Hobbs <jason.hobbs@calxeda.com> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-17common, menu: use abortboot for menu timeoutJason Hobbs1-1/+1
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17Add generic, reusable menu codeJason Hobbs1-0/+30
This will be used first by the pxe code, but is intended to be generic and reusable for other jobs in U-boot. Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>