Date: Wed, 10 Nov 2010 11:01:32 -0500 From: David Rhodus <sdrhodus@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: "current@freebsd.org" <current@freebsd.org> Subject: Re: Only display ACPI bootmenu key if ACPI is present Message-ID: <D625EC79-3929-40C4-9AB8-2C33B12A2E9A@gmail.com> In-Reply-To: <201011081714.53637.jhb@freebsd.org> References: <201011081714.53637.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
What are the chances the detection fails and one still needs to disable ACPI= and can't because it's not showing as a option ? Thanks, David Rhodus On Nov 8, 2010, at 5:14 PM, John Baldwin <jhb@freebsd.org> wrote: > 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 av= oids > displaying a menu item prompting to enable ACPI if the BIOS doesn't actual= ly > include ACPI. Any objections? >=20 > --- //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 > ; >=20 > -: acpienabled? ( -- flag ) > +: acpipresent? ( -- flag ) > s" hint.acpi.0.rsdp" getenv > dup -1 =3D 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" >=20 > --=20 > 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"=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D625EC79-3929-40C4-9AB8-2C33B12A2E9A>