git: 7cb65be96d47 - main - stand: Use correct loader needs to be updated code

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 30 Jul 2024 03:34:34 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=7cb65be96d47cbe0b740266bc633d272fc4c5e6b

commit 7cb65be96d47cbe0b740266bc633d272fc4c5e6b
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-07-30 02:15:19 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-07-30 02:26:11 +0000

    stand: Use correct loader needs to be updated code
    
    Use the correct loader code that adds an inactive highlighted menu item
    indicating that an update is needed.
    
    My laptop is the only machine that I have a boot menu. I'd debugged the
    menu part there, but had all the other changes, including my original
    menu code, on my server and hadn't copied it back before pushing.
    
    Fixes: 0eac99f76ec3
    Sponsored by: Netflix
---
 stand/lua/menu.lua | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua
index 66d7fe673023..0587e5ae6586 100644
--- a/stand/lua/menu.lua
+++ b/stand/lua/menu.lua
@@ -245,7 +245,6 @@ menu.welcome = {
 			boot_entry_1, boot_entry_2 = multi_user, single_user
 		end
 		return {
-			loader_needs_upgrade,
 			boot_entry_1,
 			boot_entry_2,
 			menu_entries.prompt,
@@ -264,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 = {
@@ -415,8 +418,8 @@ menu.welcome = {
 		loader_needs_upgrade = {
 			entry_type = core.MENU_SEPARATOR,
 			name = function()
-				return "Loader requires updating"
-			end
+				return color.highlight("Loader needs to be updated")
+			end,
 			visible = function()
 				return core.loaderTooOld()
 			end