summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-08-24 00:22:23 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-08-24 00:22:23 +0000
commit5f88472daab576b55cc2d1a61f91397b305acdb8 (patch)
treeecc373c86c31da7db6ae77af1884c29600c39b48 /sys
parentac821ba3c374ff7987d3088b484eb461af923cca (diff)
Move d_secpercyl test to after setting default size. Missed in earlier
adjustment of other disksubr.c's.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/disksubr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c
index 4131dd5d64d..30e89d1fd20 100644
--- a/sys/arch/amd64/amd64/disksubr.c
+++ b/sys/arch/amd64/amd64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.12 2006/08/20 03:14:21 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.13 2006/08/24 00:22:22 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -78,10 +78,10 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
/* minimal requirements for archetypal disk label */
if (lp->d_secsize < DEV_BSIZE)
lp->d_secsize = DEV_BSIZE;
- if (lp->d_secpercyl == 0)
- return ("invalid geometry");
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;