Subject: Re: CVS commit: basesrc/sbin/newfs
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Luke Mewburn <lukem@wasabisystems.com>
List: source-changes
Date: 02/19/2002 16:04:47
On Sun, Feb 17, 2002 at 07:40:56AM -0800, Jason Thorpe wrote:
  | On Sun, Feb 17, 2002 at 04:57:23PM +1100, Luke Mewburn wrote:
  | 
  |  > I'm curious as to who finds the old behaviour so useful and/or
  |  > necessary that they can't first edit the disklabel to contain the
  | 
  | There are certain types of devices for which you might not want to use
  | a disklabel.
  | 
  |  > correct partition type and other information, or use newfs -F
  |  > (which ignores the disk label entry entirely).
  | 
  | Then I suggest you fix -F to not require -s to also be provided unless
  | the size of the device cannot be determined at run-time.

I could just add another option (such as "-I" to `ignore partition
type check') and only check the partition type if that option isn't
set.

(Changing -F to grok the size from the device is ugly; it means adding
a bunch of disklabel groking magick to the -F code that doesn't need
to be there otherwise.)


  |  > I received a reasonable amount of positive feedback about the addition
  |  > of that test (which prevents non 4.2BSD file systems from being newfs-ed
  |  > unless you use -F), and having been bitten myself by accidentally
  |  > newfs-ing the wrong partition because of a one character typo (and I'm
  |  > sure that I'm not the only one), I disagree strongly with your backing
  |  > out of that test.
  | 
  | Yah, and I suppose we should make "rm -i" the default, too?

Not really.  rm -i protects single files (I don't use rm -i fwiw).
This check prevents the inadvertant nuking of entire file systems.
I think your analogy is drawing a long bow :-)

Luke.