diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-08 05:34:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-08 05:34:29 +0000 |
commit | 6734ce8e36b95fafe001d2956bb65942845607be (patch) | |
tree | 96578f083e0ca4e703ee02f5afb3bda67f049ce9 /sys/arch/mvme88k | |
parent | 97db233d6e3ac6a4dd0ab00e7fbfe9bb0de82901 (diff) |
all disklabels read from the kernel now always contain a total sector
size which is the REAL DISK SIZE. always. if a driver fails to set
this right, please fix it. agreed with otto and krw
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/disksubr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index 9bd51b1dc56..37e746f253b 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.43 2007/06/07 03:41:52 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.44 2007/06/08 05:34:28 deraadt Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -382,7 +382,8 @@ cputobsdlabel(struct disklabel *lp, struct cpu_disklabel *clp) lp->d_ntracks = clp->cfg_hds; lp->d_secpercyl = clp->secpercyl; - DL_SETDSIZE(lp, clp->secperunit); + if (DL_GETDSIZE(lp) == 0) + DL_SETDSIZE(lp, clp->secperunit); lp->d_sparespertrack = clp->sparespertrack; lp->d_sparespercyl = clp->sparespercyl; lp->d_acylinders = clp->acylinders; @@ -439,7 +440,8 @@ cputobsdlabel(struct disklabel *lp, struct cpu_disklabel *clp) lp->d_ntracks = clp->cfg_hds; lp->d_secpercyl = clp->secpercyl; - DL_SETDSIZE(lp, clp->secperunit); + if (DL_GETDSIZE(lp) == 0) + DL_SETDSIZE(lp, clp->secperunit); lp->d_sparespertrack = clp->sparespertrack; lp->d_sparespercyl = clp->sparespercyl; lp->d_acylinders = clp->acylinders; |