Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Luke Mewburn <lukem@netbsd.org>
List: source-changes
Date: 12/24/2000 15:57:38
Module Name:	basesrc
Committed By:	lukem
Date:		Sun Dec 24 13:57:37 UTC 2000

Modified Files:
	basesrc/sbin/mbrlabel: Makefile mbrlabel.8 mbrlabel.c

Log Message:
i got sick of the brain damage that mbrlabel used to do, and had
gotten bitten by mbrlabel trashing my incore disklabel to a point where
the machine wasn't usable, so I reworked it:

* only update the incore (and on-disk) label if `-f' is given. by default,
  the proposed disklabel will be printed but no changes will occur
* add -q, to make the default operation a bit more quiet.
* leave existing `used' in-core partition slots alone, and only add entries
  to the incore label if:
	- there's not an existing partition of the same size and offset
	  (even of a different type)
	- there's a free partition slot (`unused', with size == 0)
* use DIOCWDINFO instead of DIOCSDINFO, to update the incore as well as
  the on-disk label
* use showpartitions() from ../disklabel/printlabel.c

this should make mbrlabel a *lot* more useful.


To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 basesrc/sbin/mbrlabel/Makefile
cvs rdiff -r1.5 -r1.6 basesrc/sbin/mbrlabel/mbrlabel.8
cvs rdiff -r1.10 -r1.11 basesrc/sbin/mbrlabel/mbrlabel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.