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/i386 | |
parent | 8bfce71941c8187b51777a022add42aac4668624 (diff) |
deal with d_secpercyl insanity
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/disksubr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index 128dead0b9c..7d99c2193f1 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.34 1998/10/03 21:18:54 millert Exp $ */ +/* $OpenBSD: disksubr.c,v 1.35 1998/11/21 20:43:43 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -91,6 +91,10 @@ readdisklabel(dev, strat, lp, osdep, spoofonly) /* minimal requirements for archtypal disk label */ if (lp->d_secsize == 0) lp->d_secsize = DEV_BSIZE; + if (lp->d_secpercyl == 0) { + msg = "invalid geometry"; + goto done; + } if (lp->d_secperunit == 0) lp->d_secperunit = 0x1fffffff; lp->d_npartitions = RAW_PART + 1; |