Create virgin disklabels with 8 (MAXPARTITIONS) partitions rather than

three (RAW_PART + 1);
This makes ``disklabel -Brw sdN auto'' do the Right Thing.
This commit is contained in:
obrien 1998-04-24 11:49:57 +00:00
parent 24250e21b4
commit 9048293be2

View File

@ -46,7 +46,7 @@
* from: wd.c,v 1.55 1994/10/22 01:57:12 phk Exp $
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: subr_diskslice.c,v 1.42 1998/02/15 05:41:31 bde Exp $
* $Id: subr_diskslice.c,v 1.43 1998/04/19 23:31:56 julian Exp $
*/
#include "opt_devfs.h"
@ -631,7 +631,7 @@ dsopen(dname, dev, mode, sspp, lp, strat, setgeom, bdevsw, cdevsw)
dsgone(sspp);
return (error);
}
lp->d_npartitions = RAW_PART + 1;
lp->d_npartitions = MAXPARTITIONS;
lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
ssp = *sspp;
#ifdef DEVFS
@ -675,8 +675,6 @@ dsopen(dname, dev, mode, sspp, lp, strat, setgeom, bdevsw, cdevsw)
lp1->d_rpm = 3600;
if (lp1->d_interleave == 0)
lp1->d_interleave = 1;
if (lp1->d_npartitions == 0)
lp1->d_npartitions = MAXPARTITIONS;
if (lp1->d_bbsize == 0)
lp1->d_bbsize = BBSIZE;
if (lp1->d_sbsize == 0)