From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 19:55:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B31BC10656D2; Mon, 15 Nov 2010 19:55:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1DC88FC0A; Mon, 15 Nov 2010 19:55:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFJtJMX026773; Mon, 15 Nov 2010 19:55:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFJtJ3R026771; Mon, 15 Nov 2010 19:55:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011151955.oAFJtJ3R026771@svn.freebsd.org> From: John Baldwin Date: Mon, 15 Nov 2010 19:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215345 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 19:55:19 -0000 Author: jhb Date: Mon Nov 15 19:55:19 2010 New Revision: 215345 URL: http://svn.freebsd.org/changeset/base/215345 Log: 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 Modified: head/sys/boot/forth/beastie.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Mon Nov 15 19:05:09 2010 (r215344) +++ head/sys/boot/forth/beastie.4th Mon Nov 15 19:55:19 2010 (r215345) @@ -140,12 +140,16 @@ at-xy ." `--{__________) " 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 ." `--{__________) " 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 !