Pull down revision 1.24.4.1 from the netbsd-1-5 branch:

Make sure that an unlabeled device gets at least RAW_PART
in the default in-core disklabel, instead of only a single
partition, so that applying a new disklabel can work normally.
This commit is contained in:
he 2001-10-27 18:32:35 +00:00
parent 1d592578e5
commit 90d849dc54

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.27 2001/09/05 14:12:21 tsutsui Exp $ */
/* $NetBSD: disksubr.c,v 1.28 2001/10/27 18:32:35 he Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@ -87,7 +87,7 @@ readdisklabel(dev, strat, lp, clp)
/* minimal requirements for archtypal disk label */
if (lp->d_secperunit == 0)
lp->d_secperunit = 0x1fffffff;
lp->d_npartitions = 1;
lp->d_npartitions = RAW_PART + 1;
if (lp->d_partitions[0].p_size == 0)
lp->d_partitions[0].p_size = 0x1fffffff;
lp->d_partitions[0].p_offset = 0;