Subject: Re: disklabel and df output
To: Frederick Bruckman <fb@enteract.com>
From: Miles Nordin <carton@Ivy.NET>
List: port-mac68k
Date: 02/03/2000 01:04:48
On Thu, 3 Feb 2000, Frederick Bruckman wrote:

> More correctly, the NetBSD-mac68k kernel doesn't _read_ any disklabel
> that might be on the disk. It fakes one up, instead, from the MacOS
> partition map.

I think it will read a big-endian NetBSD label off the disk, if it's in
the right spot.  It won't go hunting for it like /sbin/disklabel does and 
it certainly won't byte-swap a label of the other endiness, but it
_can_ read them.  It's not really important, but see line 456 of
sys/arch/mac68k/mac68k/disksubr.c.

so, back to the original statement:  the mac68k quirk is simply that
setdisklabel(...) is entirely disabled on the mac68k.  Even if you simply
ask to update the fake in-core label, the kernel will silently succeed and
do nothing.  IMHO this is not good behaviour--there are specific ioctl's
for setting an in-core fake label and _not_ writing it to the disk, and
the mac68k kernel should obey them.  If you ask to _write_ a label to the
disk, it should return an error, not silently succeed.

This behaviour would be useful for things like mbrlabel(8).  Basically all
that needs changing is an #if 0 -> #if 1.  I did it in my kernel and
superficially it seems to work fine.

-- 
Miles Nordin / v:+1 720 841-8308 fax:+1 530 579-8680
555 Bryant Street PMB 182 / Palo Alto, CA 94301-1700 / US