Subject: Re: CVS commit: src/sys/kern
To: None <david@l8s.co.uk>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: source-changes
Date: 07/08/2003 00:36:44
In article <20030707162312.Z629@snowdrop.l8s.co.uk>
david@l8s.co.uk wrote:
> > On i386 and arc MBR_PART is 3, but it is 2 on sh3, arm and prep.
> I hope you mean RAW_PART....
Oops, sorry, yes I meant RAW_PART there.
> > but i386 (and some ports) assume it is top of C.
> Actually the get the disklabel from the start of the first netbsd
> MBR partition, then make (or hope) that it is partition C.
I'm saying about bounds_check_with_label().
readdisklabel() and writedisklabel() search and read MBR partition
directly and don't refer partition C in them, as I said.
Then if bounds_check_with_label() is rewriten to use the same way
with readdisklabel(), there is no reason to use partition C
as the first NetBSD MBR partition.
(BTW, disklabel(8) command also uses partition C in writelabel()
if USE_MBR is defined, but it could be fixed as well.)
> > There is no unified API yet even for MBR, so we should define it first.
>
> Making other ports use that code will (and I knew it would) require
> some tweaks. But the intention is to use MI code.
But there is no consensus that current i386 way is the best.
(At least I disagree ;-p)
I think that's the reason why there are many
"replicated (but a bit modified) code in each MD directory.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp