Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Nov 2010 17:14:53 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        current@freebsd.org
Subject:   Only display ACPI bootmenu key if ACPI is present
Message-ID:  <201011081714.53637.jhb@freebsd.org>

next in thread | raw e-mail | index | archive | help
This patch changes the Forth code for the Beastie menu to only display the
menu option to enable or disable ACPI if the loader detects ACPI.  This avoids
displaying a menu item prompting to enable ACPI if the BIOS doesn't actually
include ACPI.  Any objections?

--- //depot/projects/smpng/sys/boot/forth/beastie.4th	2010-11-08 21:53:18.000000000 0000
+++ //depot/user/jhb/ktrace/boot/forth/beastie.4th	2010-11-08 22:14:04.000000000 0000
@@ -140,12 +140,16 @@
 	fbsdbw-logo
 ;
 
-: acpienabled? ( -- flag )
+: acpipresent? ( -- flag )
 	s" hint.acpi.0.rsdp" getenv
 	dup -1 = if
 		drop false exit
 	then
 	2drop
+	true
+;
+
+: acpienabled? ( -- flag )
 	s" hint.acpi.0.disabled" getenv
 	dup -1 <> if
 		s" 0" compare 0<> if
@@ -178,8 +182,7 @@
 	42 20 2 2 box
 	13 6 at-xy ." Welcome to FreeBSD!"
 	printmenuitem ."  Boot FreeBSD [default]" bootkey !
-	s" arch-i386" environment? if
-		drop
+	acpipresent? if
 		printmenuitem ."  Boot FreeBSD with ACPI " bootacpikey !
 		acpienabled? if
 			." disabled"

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011081714.53637.jhb>