Subject: Re: disklabel(8) and machdep on-disk structures issues
To: Luke Mewburn <lukem@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 10/31/2003 20:30:46
On Fri, Oct 31, 2003 at 12:12:03PM +1100, Luke Mewburn wrote:
> Part of the problem is that DIOCWDINFO (update in-core, then update raw)
> _fails_ if there isn't an existing raw label. So disklabel(8) -r has to
Well, not on all ports. On sparc{,64}, sun3 and next68k at last, it'll hapilly
write the label.
> be used to create the raw label. Which in itself is fraught with
> difficulties (due to obscure inconsistencies between how disklabel -r -I
> and disklabel -r -R operate). Thus, if you're doing work with disks
> from C, the best thing to do at this time is to make the label writable
> with DIOCWLABEL, and pread()/pwrite() the labelsector yourself...
>
> That all said, if DIOCWDINFO was change to _not_ fail if there's
> no existing raw label and just write it anyway (my preferred,
Me too.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 24 ans d'experience feront toujours la difference
--