Subject: Re: Adding kernel code to libkern
To: None <>
From: None <>
List: tech-kern
Date: 05/13/2003 11:28:24
At Tue, 13 May 2003 16:59:47 +0000 (UTC), "David Laight" wrote:
> > > The code I'm actually looking at is that which finds the netbsd disklabel
> > > on a disk with an MBR (eg most i386 disks).  It also generates a label
> > > from the MBR itself if the disk doesn't contain one in a NetBSD partition.
> > 
> > based on what it is, i'd say that it belongs in a separate kernel
> > library (that could contain other disklabel stuff as well).  Really,
> > all the disklable-grovelling code belongs in a library of its own,
> > accessable on all ports, IMO.
> It doesn't need to be a library - just a common file.
> I've moved it inmy source tree - but can't change/test all the ports :-(
> There seem to be 16 ports that use mbr disks (and all the others might
> see one - especially with USB disks and other interchange media.

Right, so, The Right Thing w.r.t. being able to find MBRs on non-x86
platforms is being forced because of technology (the proliferation of
devices that use them).

Similarly, it would be "right" to take, say, a SCSI or IDE disk from
an amiga, plug it into a PC, and be able to find the data on it.

the point is, *all* of the disklabel code should be in a library.

Right now, the one piece you want "has" to be, but the rest of it
should be.  Not saying that you have to do the work of putting it all
in said library, but it seems the the right thing would be to at least
make a start of a place for people to put the code.