diff options
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/disksubr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 7ae7359562d..a25cd33196a 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.18 2006/08/11 21:32:40 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.19 2006/08/17 10:34:14 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -89,6 +89,8 @@ readdisklabel(dev, strat, lp, clp, spoofonly) lp->d_secsize = DEV_BSIZE; if (lp->d_secperunit == 0) lp->d_secperunit = 0x1fffffff; + if (lp->d_secpercyl == 0) + return ("invalid geometry"); lp->d_npartitions = RAW_PART+1; for (i = 0; i < RAW_PART; i++) { lp->d_partitions[i].p_size = 0; |