Subject: Re: disklabel(8) and machdep on-disk structures issues
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 10/31/2003 17:27:49
On Sat, Nov 01, 2003 at 01:21:56AM +0900, Izumi Tsutsui wrote:
> In article <20031031160704.GC1469@antioche.lip6.fr>
> bouyer@antioche.lip6.fr wrote:
> 
> > - Fix the sun3 LABELOFFSET, and factor out disksubr.c between sun3, sparc and
> >   sparc64 (with some compat code to look for a NetBSD disklabel at
> >   LABELOFFSET=64 in the sun3 case)
> 
> Current readdisklabel() on sparc assume BSD disklabel is
> located at LABELOFFSET, but isn't it better to change it
> to search DISKMAGIC like current readdisklabel() on sun3?
> It allows to read disks whose BSD labels are written on other
> NetBSD machines.

I don't like that very much, at last not in the way it's done in sun3
(it should try LABELOFFSET first, otherwise if it happens to have
DISKMAGIC somewhere we could end up reading garbadge before trying the real
label at LABELOFFSET).
Anyway, disklabel isn't cross-endian currently, so this would only work
for big-endian hosts.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
     NetBSD: 24 ans d'experience feront toujours la difference
--