diff options
author | jhb <jhb@FreeBSD.org> | 2010-11-15 19:55:19 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2010-11-15 19:55:19 +0000 |
commit | 148263e158fc89f1572b4eedd787d777e50f6d3e (patch) | |
tree | b190a2a712de867f19fda730606e82000ef9c05e /sys/boot | |
parent | a1764a48d95e6529e2aa345b0f70ad77f37f637b (diff) | |
download | FreeBSD-src-148263e158fc89f1572b4eedd787d777e50f6d3e.zip FreeBSD-src-148263e158fc89f1572b4eedd787d777e50f6d3e.tar.gz |
Don't display option 2 (to toggle ACPI on or off) on x86 machines if the
BIOS does not support ACPI. The other options in the menu retain their
existing numbers, option 2 is simply blanked out (and '2' is ignored).
MFC after: 1 month
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/forth/beastie.4th | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/boot/forth/beastie.4th b/sys/boot/forth/beastie.4th index 79b818d..65d5fc0 100644 --- a/sys/boot/forth/beastie.4th +++ b/sys/boot/forth/beastie.4th @@ -140,12 +140,16 @@ at-xy ." `--{__________) [0m" 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 @@ at-xy ." `--{__________) [0m" 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 ! |