On Wednesday, November 10, 2010 8:57:35 am John Baldwin wrote:
It turned out to be easier to leave a blank line to do this, but this patch
does that. It leaves the numbers unchanged but simply omits the '2' option
if the system does not support ACPI.
--- //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-10 14:50:44.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
@@ -180,11 +184,18 @@
printmenuitem ." Boot FreeBSD [default]" bootkey !
s" arch-i386" environment? if
drop
- printmenuitem ." Boot FreeBSD with ACPI " bootacpikey !
- acpienabled? if
- ." disabled"
+ acpipresent? if
+ printmenuitem ." Boot FreeBSD with ACPI " bootacpikey !
+ acpienabled? if
+ ." disabled"
+ else
+ ." enabled"
+ then
else
- ." enabled"
+ menuidx @
+ 1+ dup
+ menuidx !
+ -2 bootacpikey !
then
else
-2 bootacpikey !
--
John Baldwin
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"