freebsd-dev/stand
Kyle Evans 5c1b516581 stand/lua: Change boot menu items' names when swapped
[Enter] should be moved to the single user menu item when we swap them.

Define a non-standard menu entry function "alternate_name" to use for this
purpose for ultimate flexibility if we change our minds later. When we're
booting single user, make a shallow copy of the menu that we'd normally
display and swap the items and their name functions to use alternate_name
instead. Toggling single user in the options menu and going back to the main
menu will now correctly reflect the current boot setting with the first two
menu options and "[Enter]" will always be on the right one.

This shallow copy technique has the chance of being quite slow since it's
done on every redraw, but in my testing it does not seem to make any obvious
difference.

shallowCopyTable could likely belong better in a general-purpose utility
module, but this (and the key constnats) are the only candidates we have at
the moment so we'll drop it into our core stuff for the moment and consider
re-organization at a later date.
2018-02-19 17:40:19 +00:00
..
arm Invent new LDR_INTERP for the loader interpreter to use. Use this in 2018-02-02 15:40:49 +00:00
arm64
common Lua loader: Add barebones "lfs" module 2018-02-18 01:15:25 +00:00
efi efi: Do not pad the efi devpath structure 2018-02-18 11:17:39 +00:00
fdt Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
ficl Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
ficl32
forth Remove pcibios forth support. 2018-02-02 15:01:49 +00:00
geli Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
i386 Revert r329269. 2018-02-17 00:12:30 +00:00
kshim A more definitions to kernel emulation shim in order to build stand/usb. 2018-02-07 18:50:36 +00:00
liblua liblua: Fix missing '}' in lutil.c after r329499 2018-02-18 01:31:18 +00:00
liblua32 Add Lua as a scripting langauge to /boot/loader 2018-02-12 15:31:53 +00:00
libsa Fix a memory leak introduced in r328426. 2018-02-16 15:41:03 +00:00
libsa32
lua stand/lua: Change boot menu items' names when swapped 2018-02-19 17:40:19 +00:00
man
mips Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
ofw Fix regression introduced in r328806, preventing boot at least on all 2018-02-03 23:49:21 +00:00
powerpc Unify metadata load files for arm, mips, powerpc, sparc64 2018-02-13 03:44:50 +00:00
sparc64 Unify metadata load files for arm, mips, powerpc, sparc64 2018-02-13 03:44:50 +00:00
uboot Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
usb Move the stand/usb test loader into its own directory. 2018-02-07 19:20:59 +00:00
userboot Fix build of userboot.so 2018-02-08 22:59:51 +00:00
zfs Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
zfs32
defs.mk Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
fdt.mk
ficl.mk Now that we no longer conditionally compile some files outside of ficl 2018-02-02 15:01:54 +00:00
loader.mk Unify metadata load files for arm, mips, powerpc, sparc64 2018-02-13 03:44:50 +00:00
lua.mk Add Lua as a scripting langauge to /boot/loader 2018-02-12 15:31:53 +00:00
Makefile Add the lua scripts from the lua-bootloader SoC 2018-02-12 15:32:00 +00:00
Makefile.amd64 Add Lua as a scripting langauge to /boot/loader 2018-02-12 15:31:53 +00:00
Makefile.arm
Makefile.arm64
Makefile.i386 Switch to proper MK_LOADER_GELI tests. 2017-12-04 01:14:12 +00:00
Makefile.inc Minor flags cleanup 2017-12-02 00:06:58 +00:00
Makefile.mips
Makefile.powerpc
Makefile.sparc64
uboot.mk Unify metadata load files for arm, mips, powerpc, sparc64 2018-02-13 03:44:50 +00:00