Subject: Re: CVS commit: src/sbin/newfs
To: Christian Limpach <cl@NetBSD.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: source-changes
Date: 10/11/2003 01:20:33
On Fri, Oct 10, 2003 at 07:14:49AM -0400, Christian Limpach wrote:
  | We should set a flag in struct disklabel which indicates if the label is a
  | default label or an actual label.  Then newfs can use the flag to use the
  | RAW_PART (or 0) partition in the default label case or choose the partition
  | from the label/partition name like we've done so far.
  | 
  | I've used a modification like this for ~1/2 year now which (ab)uses a
  | special DTYPE (DTYPE_RAW) instead of a flag, but using a flag is better. 
  | I'd use the high bit of d_type as the flag.
  | 
  | *getdefaultlabel sets the flag
  | *getdisklabel clears the flag after reading the disklabel if there is one
  | on the device

I use:
	dp->d_bbsize == 0 && dp->d_sbsize == 0
Not "perfect", but it does appear to DTRT.

However, I won't object to a cleaner/more consistent solution to this
problem.


Luke.