diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-21 20:43:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-21 20:43:45 +0000 |
commit | 4bbe5420d3817e31d674e3475965ed3551363f72 (patch) | |
tree | dc349b52c646825153a642d519b8d6e7dbba21b6 /sys/arch/mips | |
parent | 8bfce71941c8187b51777a022add42aac4668624 (diff) |
deal with d_secpercyl insanity
Diffstat (limited to 'sys/arch/mips')
-rw-r--r-- | sys/arch/mips/mips/disksubr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/mips/mips/disksubr.c b/sys/arch/mips/mips/disksubr.c index a3a748829ce..36aee7976bc 100644 --- a/sys/arch/mips/mips/disksubr.c +++ b/sys/arch/mips/mips/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.6 1998/10/03 21:18:55 millert Exp $ */ +/* $OpenBSD: disksubr.c,v 1.7 1998/11/21 20:43:44 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -96,6 +96,10 @@ readdisklabel(dev, strat, lp, osdep, spoofonly) lp->d_secsize = DEV_BSIZE; if (lp->d_secperunit == 0) lp->d_secperunit = 0x1fffffff; + if (lp->d_secpercyl == 0) { + msg = "invalid geometry"; + goto done; + } lp->d_npartitions = RAW_PART + 1; for (i = 0; i < RAW_PART; i++) { lp->d_partitions[i].p_size = 0; |