NetBSD/sbin/disklabel
abs cb52ff7f22 Fix some interesting disklabel lossage:
If the input to 'disklabel' (non -i) referenced a partition two or more
larger than that permitted by npartitions it would error out with 'bad
partition name' (and the option given to re-edit if -e). If a partition one
larger was used it would be dropped from the disklabel with a warning and the
label written anyway! The (off by one) check for a bad partition name was
against npartitions anyway, rather than MAXPARTITIONS. npartitions was just
read from the disklabel and could have been set to an arbitrary value.

Given 'disklabel -i' sets npartitions automatically, make the normal case
check partition names against MAXPARTITIONS, and if necessary increase
npartitions to the size needed to hold the last partition used.

While here remove two 'write only' uses of a 'part' variable.
2004-06-22 18:32:45 +00:00
..
disklabel.5 Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:11 +00:00
disklabel.8 Bump date for last. Put the exit EXIT STATUS section in the right place. 2004-05-28 20:46:52 +00:00
disklabel.c Fix some interesting disklabel lossage: 2004-06-22 18:32:45 +00:00
dkcksum.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:11 +00:00
dkcksum.h - convert to KNF ANSI style guide 2000-12-24 05:59:11 +00:00
extern.h Remove `const' attribute from writelabel prototype and function to make it 2001-12-13 13:52:13 +00:00
interact.c Add missing ' in prompt text. 2003-12-29 21:21:25 +00:00
Makefile * Enable SAVEBOOTAREA on i386 and amd64 (by merging the Makefile 2004-01-18 22:34:22 +00:00
pathnames.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:11 +00:00
printlabel.c Print everything unsigned - helps a bit for disks with [2^31..2^32) sectors. 2004-02-28 18:19:00 +00:00