Date: Wed, 8 Sep 2010 14:11:37 -0400 From: John Baldwin <jhb@freebsd.org> To: Wayne Sierke <ws@au.dyndns.ws> Cc: freebsd-doc@freebsd.org, Brad Davis <brd@freebsd.org> Subject: Re: docs/108101: /boot/default/loader.conf contains an incorrect comment Message-ID: <201009081411.37251.jhb@freebsd.org> In-Reply-To: <1283967749.94089.88.camel@predator-ii.buffyverse> References: <201009061550.o86Fo7OA004875@freefall.freebsd.org> <201009071717.12787.jhb@freebsd.org> <1283967749.94089.88.camel@predator-ii.buffyverse>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <brd@FreeBSD.org> > > > > > > > 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. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009081411.37251.jhb>