Subject: Re: CVS commit: src/sys/kern
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 07/07/2003 15:13:19
On Mon, Jul 07, 2003 at 10:50:52PM +0900, Izumi Tsutsui wrote:
> In article <20030707132849.1CC3CB004@cvs.netbsd.org>
> dsl@netbsd.org wrote:
> 
> > Module Name:	src
> > Committed By:	dsl
> > Date:		Mon Jul  7 13:28:49 UTC 2003
> > 
> > Added Files:
> > 	src/sys/kern: subr_disk_mbr.c
> > 
> > Log Message:
> > MI code to read disklabels from mbr disks.
> 
> Is it OK to assume that disklabel is always top of C partition?
> Some ports (sh3, arm etc.) use MBR but their RAW_PART is 2.
> I think we should also check MBR partition in
> bounds_check_with_label().

Actually I think the code should be saving the 'disklabel' sector
in the 'struct disk' - then the code wouldn't have to assume that
any particular partition contained the disklabel.

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?)

I also haven't actually made any other ports use the code (yet).

I actually wonder if there is some milage in making /dev/wd0z (etc)
always be the raw partition, and actually accessing using a
device number that doesn't correspond to any patition?

	David

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