From owner-freebsd-doc@FreeBSD.ORG Wed Sep 8 19:53:23 2010 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FD1310657E5; Wed, 8 Sep 2010 19:53:23 +0000 (UTC) (envelope-from so14k@valentine.liquidneon.com) Received: from valentine.liquidneon.com (valentine.liquidneon.com [216.87.78.132]) by mx1.freebsd.org (Postfix) with ESMTP id 75E5E8FC13; Wed, 8 Sep 2010 19:53:23 +0000 (UTC) Received: by valentine.liquidneon.com (Postfix, from userid 1018) id 7D9758FEC4; Wed, 8 Sep 2010 13:52:52 -0600 (MDT) Date: Wed, 8 Sep 2010 13:52:52 -0600 From: Brad Davis To: John Baldwin Message-ID: <20100908195252.GG43322@valentine.liquidneon.com> References: <201009061550.o86Fo7OA004875@freefall.freebsd.org> <201009071717.12787.jhb@freebsd.org> <1283967749.94089.88.camel@predator-ii.buffyverse> <201009081411.37251.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009081411.37251.jhb@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-doc@freebsd.org Subject: Re: docs/108101: /boot/default/loader.conf contains an incorrect comment X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2010 19:53:23 -0000 On Wed, Sep 08, 2010 at 02:11:37PM -0400, John Baldwin wrote: > On Wednesday, September 08, 2010 1:42:29 pm Wayne Sierke wrote: > > On Tue, 2010-09-07 at 17:17 -0400, John Baldwin wrote: > > > On Tuesday, September 07, 2010 4:40:55 pm Brad Davis wrote: > > > > On Tue, Sep 07, 2010 at 02:54:27PM -0400, John Baldwin wrote: > > > > > On Tuesday, September 07, 2010 12:52:25 pm Brad Davis wrote: > > > > > > On Tue, Sep 07, 2010 at 08:30:25AM -0400, John Baldwin wrote: > > > > > > > On Monday, September 06, 2010 11:50:07 am Brad Davis wrote: > > > > > > > > The following reply was made to PR docs/108101; it has been noted by GNATS. > > > > > > > > > > > > > > > > From: Brad Davis > > > > > > > > To: bug-followup@FreeBSD.org > > > > > > > > Cc: > > > > > > > > Subject: Re: docs/108101: /boot/default/loader.conf contains an incorrect > > > > > > > > comment > > > > > > > > Date: Mon, 6 Sep 2010 09:12:57 -0600 > > > > > > > > > > > > > > > > Confirmed. > > > > > > > > > > > > > > > > Trying to find out if we can fix the loader, rather than remove the > > > > > > > > comment. > > > > > > > > > > > > > > Does it work properly if you use beastie_disable="YES" in loader.conf? > > > > > > > > > > > > It does. > > > > > > > > > > Hmm, presumably it is a regression in beastie.4th then. Unfortunately I do > > > > > not know Forth at all. Something like this might work: > > > > > > > > > > Index: beastie.4th > > > > > =================================================================== > > > > > --- beastie.4th (revision 212292) > > > > > +++ beastie.4th (working copy) > > > > > @@ -241,6 +241,10 @@ > > > > > 10 > > > > > else > > > > > 0 0 2swap >number drop drop drop > > > > > + dup -1 = if > > > > > + exit > > > > > + then > > > > > + drop > > > > > then > > > > > begin > > > > > dup tkey > > > > > > > > > > (I would test this via PXE or some such at first so you can easily back this > > > > > out if it fubar's the boot process.) > > > > > > > > I tested it and it seems to ignore it and start counting down anyways. > > > > > > Hmmm, I'll have to think about this some more. This code is not easy to parse. :( > > > Does it still respect autoboot_delay if you set it to a non-default value? > > > > The problem is that ">number" itself only processes unsigned values and > > so doesn't process punctuation characters when doing the conversion. > > Thus for "-1" (and for any string commencing with a non-digit) it > > returns the initial value passed to it, 0 (the double 0 before >number). > > I can put together a word to do generalised string-to-number conversion > > for the bootloader if wanted. Another option is just to add an explicit > > test for the "-1" string: > > > > --- beastie.4th.orig 2009-11-22 01:00:55.000000000 +1030 > > +++ beastie.4th 2010-09-09 11:14:06.000000000 +0930 > > @@ -240,7 +240,11 @@ > > drop > > 10 > > else > > - 0 0 2swap >number drop drop drop > > + 2dup s" -1" compare 0= if > > + 0 boot > > + else > > + 0 s>d 2swap >number 2drop drop > > + then > > then > > begin > > dup tkey > > Ah, I had just sent something similar to brd@ (he had replied privately): > > Index: beastie.4th > =================================================================== > --- beastie.4th (revision 212292) > +++ beastie.4th (working copy) > @@ -240,7 +240,11 @@ > drop > 10 > else > - 0 0 2swap >number drop drop drop > + 2dup s" -1" compare 0= if > + 2drop > + exit > + then > + 0 0 2swap >number 2drop drop > then > begin > dup tkey > > I think 's>d' is an improvement over pushing two 0's. I tested -1, 3, and 15 and all work as they should. Thanks guys! Regards, Brad Davis