Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2002 22:03:47 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        peter@wemm.org, <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:  <20021215212902.D10945-100000@gamplex.bde.org>
In-Reply-To: <20021214.223420.98776954.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 14 Dec 2002, M. Warner Losh wrote:

> 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.

"wd" is to support booting old kernels.  The -a feature can't be used
for this, because some old kernels that have wd also have broken support
for -a.  The environment (mis)feature can't be used to pass the device
by name, because boot2 doesn't support it and most old kernels that
have wd don't have support for the environment.  Perhaps the whole table
is to support booting old kernels that don't have the environment feature.

"  " was to save space when there was no separate table of major numbers
(dev_maj).  The index in the table gave the major number and a placeholder
was needed for index 3 when the device in that slot ("wt") was fully
unsupported.  The table entries must be strings of length 2 to save space
in the code, so "" would not work for the placeholder.  See rev.1.1
biosboot/disk.c for the original table.

Bruce


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?20021215212902.D10945-100000>