Subject: Re: CVS commit: src/sys/kern
To: <>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 07/07/2003 15:50:57
On Mon, Jul 07, 2003 at 11:41:04PM +0900, Izumi Tsutsui wrote:
> In article <20030707151319.T629@snowdrop.l8s.co.uk>
> david@l8s.co.uk wrote:
> 
> > AFAICT that '2' is the only place where anything looks at the
> > 'MBR_PARTITION' and that means that i386 can't have RAW_PART == 2.
> > (Dare we change it?)
> 
> But I think bounds_check_with_label() is the only kernel function
> that uses '2' to look at the "NetBSD partition" in MBR partitoin.
> readdisklabel() and writedisklabel() use "dospartoff" which is
> extracted from MBR partition. Of cource we should also fix
> disklabel(8) command, but it should be trivial.

disklabel(8) searches the MBR as well.

> > I also haven't actually made any other ports use the code (yet).
> 
> But if you want to put the code into MI place, we should define
> proper APIs first. There are many machine depedent partition
> structures other than MBR. (see hp700/hp700/disksubr.c for example)

The API is an existing one.

To my mind if a reasonable number of ports require the same functionality
then it should be provided by an MI source file.  Minor variations
being done using #defines and #ifs.  There is far too much replicated
code in the netbsd source tree.

	David

-- 
David Laight: david@l8s.co.uk