From owner-svn-src-all@FreeBSD.ORG Mon Jan 9 02:22:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E53F106566B; Mon, 9 Jan 2012 02:22:27 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 1DEAB8FC12; Mon, 9 Jan 2012 02:22:26 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa05 [127.0.0.1]) by ltcfislmsgpa05.fnfis.com (8.14.4/8.14.4) with SMTP id q091QqDY028283; Sun, 8 Jan 2012 19:46:31 -0600 Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa05.fnfis.com with ESMTP id 127erq19hx-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sun, 08 Jan 2012 19:46:31 -0600 Received: from [10.0.0.104] (10.14.152.28) by smtp.fisglobal.com (10.132.206.17) with Microsoft SMTP Server (TLS) id 14.1.323.3; Sun, 8 Jan 2012 19:46:29 -0600 MIME-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="us-ascii" From: Devin Teske In-Reply-To: Date: Sun, 8 Jan 2012 17:46:27 -0800 Content-Transfer-Encoding: quoted-printable Message-ID: <2C0D66FB-4056-45FB-998C-4234C3E13B6F@fisglobal.com> References: <201112300624.pBU6OxO9098906@svn.freebsd.org> <4F08A518.8090207@FreeBSD.org> To: Sergey Kandaurov X-Mailer: Apple Mail (2.1084) X-Originating-IP: [10.14.152.28] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2012-01-09_01:2012-01-06, 2012-01-09, 1970-01-01 signatures=0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r228985 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 02:22:27 -0000 On Jan 8, 2012, at 12:35 PM, Sergey Kandaurov wrote: > On 8 January 2012 00:03, Dimitry Andric wrote: >> On 2011-12-30 07:24, Sergey Kandaurov wrote: >>>=20 >>> Author: pluknet >>> Date: Fri Dec 30 06:24:59 2011 >>> New Revision: 228985 >>> URL: http://svn.freebsd.org/changeset/base/228985 >>>=20 >>> Log: >>> Unset the environment variables associated with individual menu items >>> before invoking the kernel. >>=20 >>=20 >> When I did a single-user mode boot to install a new world, I saw the >> following warning on the (serial) console during boot: >>=20 >> /boot.config: -D -S115200 >> Consoles: internal video/keyboard serial port >> BIOS drive A: is disk0 >> BIOS drive C: is disk1 >> BIOS 638kB/3143616kB available memory >>=20 >> FreeBSD/x86 bootstrap loader, Revision 1.1 >> (dim@vm-freebsd10-amd64.home.andric.com, Sat Jan 7 01:05:07 CET 2012) >> Loading /boot/defaults/loader.conf >> /boot/kernel/kernel data=3D0xb73530 data=3D0x11dbe0+0x2b4db8 >> syms=3D[0x8+0xfd620+0x8+0xec6b6] >> - >> Hit [Enter] to boot immediately, or any other key for command prompt. >>=20 >>=20 >> Type '?' for a list of commands, 'help' for more detailed help. >> OK boot -s >> menu-unset not found <<-- what's this? >> GDB: no debug ports present >> KDB: debugger backends: ddb >> KDB: current backend: ddb >> [...kernel boots...] >>=20 >> E.g, it always gives a 'menu-unset not found' warning (or maybe it's an >> error, it's not clear). This was not the case before r228985. >>=20 >> I have almost no knowledge about forth, but it looks like this might be >> caused by the new try-menu-unset subroutine. >>=20 >> My loader.conf is just this: >>=20 >> beastie_disable=3D"YES" >> comconsole_speed=3D"115200" >> console=3D"comconsole vidconsole" >> kern.hz=3D"100" >=20 > So, the problem arise when beastie_disable is set. >=20 > In this case menu.rc is not evaluated and consequently menu-unset does > not have a body yet. This results in the ficl warning "not found" when > try-menu-unset calls menu-unset. The warning cannot be handled with catch > as seen with the code in head. > Otherwise, when beastie is enabled, all works as it should. >=20 > To "fix" the problem I replaced 'catch' with 'sfind', so that we can > conditionally call menu-unset only when the definition is present. >=20 > Please try the following patch. I tested it with enabled/disabled beastie > and loader_color over serial console. I would also like to get a review > from Devin Teske to see if this change is acceptable. >=20 > %%% > Index: sys/boot/forth/loader.4th > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/boot/forth/loader.4th (revision 229670) > +++ sys/boot/forth/loader.4th (working copy) > @@ -45,8 +45,10 @@ >=20 > : try-menu-unset > s" menu-unset" > - ['] evaluate catch if > - 2drop > + sfind if > + execute > + else > + drop > then > ; >=20 > %%% >=20 I've reviewed the patch, but also submitted my solution as PR amd64/163938. However, I love your use of sfind -- it's perfect. Nice job! I'm incorporating your patch into my patch for PR amd64/163938 for posterit= y measures and historical archiving. Please review in a few moments after submission of my followup. > [ It could be simplified with one-liner: > s" menu-unset" sfind drop execute > but ficl doesn't like this in a freestanding environment.] >=20 Nah, multi-line is perfectly fine. --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.