Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Dec 2002 22:34:20 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        peter@wemm.org
Cc:        phk@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/boot/i386/boot2 Makefile boot1.s 
Message-ID:  <20021214.223420.98776954.imp@bsdimp.com>
In-Reply-To: <20021215005215.2476D2A7EA@canning.wemm.org>
References:  <200212141944.gBEJiDWS027256@repoman.freebsd.org> <20021215005215.2476D2A7EA@canning.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20021215005215.2476D2A7EA@canning.wemm.org>
            Peter Wemm <peter@wemm.org> writes:
: Poul-Henning Kamp wrote:
: >   Modified files:
: >     sys/boot/i386/boot2  Makefile boot1.s 
: >   Log:
: >   Employ the unused bytes after the disklabel in the second sector.  This mak
:     es
: >   it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the
: >   traditional 16 sectors.
: >   
: >   UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably
: >   not within our reach, ever.
: 
: That sounds like a challenge! :-)
: http://people.freebsd.org/~peter/boot2.diff
: 
: That is a WIP and COMPLETELY UNTESTED patch to turn on UFS1_AND_UFS2
: and it ends up with 7 bytes free.  I wouldn't install this on anything
: but a spare floppy disk yet.

I found two minor improvements that can be made on this diff, which
I've sent to Peter privately.

First, why do we have "wd" and " " as device names?  Can't we just
remove them?  There's no wd driver in i386 anymore (pc98 has one, but
uses different boot2).  I have no clue what purpose the " " device
served, except maybe as a way to patch something in later that we
never seem to have patched in.  Elimination saves 20 bytes.

Second, you can rearrange getstr a little and save 4 more bytes by
using continue in two places rather than break and eliminating the if
before the putchar.  This would bring Peter's diffs up to 31 bytes
free.   I'm sure some careful study would increase the number.

Also, a lot more comments should be added in places where we're clever
in case future compilers generate bloatified code and others need to
read the code for comprehension.

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021214.223420.98776954.imp>