stand: Add "Loader needs updating" to the first menu item"

When the boot loader version is too old, add a warning to the boot menu
to maybe catch people's attention.

Use the correct loader code that adds an inactive highlighted menu item
indicating that an update is needed.

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D45890

(cherry picked from commit 0eac99f76ec31270f902cc2a0ff5ae4b5b606a65)
(cherry picked from commit 7cb65be96d47cbe0b740266bc633d272fc4c5e6b)
This commit is contained in:
Warner Losh 2024-07-29 16:57:37 -06:00
parent 53a4bf76c5
commit 59bfc69490

View file

@ -263,6 +263,10 @@ menu.welcome = {
menu_entries.boot_envs,
menu_entries.chainload,
menu_entries.vendor,
{
entry_type = core.MENU_SEPARATOR,
},
menu_entries.loader_needs_upgrade,
}
end,
all_entries = {
@ -411,6 +415,15 @@ menu.welcome = {
end,
alias = {"l", "L"},
},
loader_needs_upgrade = {
entry_type = core.MENU_SEPARATOR,
name = function()
return color.highlight("Loader needs to be updated")
end,
visible = function()
return core.loaderTooOld()
end
},
vendor = {
entry_type = core.MENU_ENTRY,
visible = function()