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/07/2003 23:58:22
In article <20030707155057.W629@snowdrop.l8s.co.uk>
david@l8s.co.uk wrote:

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

Yes, I agree we should not have replicated code,
but unfortunately all of them don't have the same API.
On i386 and arc MBR_PART is 3, but it is 2 on sh3, arm and prep.
arm ports assume that disklabel is top of RAW_PART,
but i386 (and some ports) assume it is top of C.
The other ports assume it is top of A.
(then bounds_check_with_label() won't work on some ports BTW)
There is no unified API yet even for MBR, so we should define it first.

IMHO, RAW_PART should be 2 on all ports.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp