cb52ff7f22
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. |
||
---|---|---|
.. | ||
disklabel.5 | ||
disklabel.8 | ||
disklabel.c | ||
dkcksum.c | ||
dkcksum.h | ||
extern.h | ||
interact.c | ||
Makefile | ||
pathnames.h | ||
printlabel.c |