summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-10-04 23:27:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-10-04 23:27:28 +0000
commit339667fcb6ab08a1a3d988f63ee1beafab056da5 (patch)
tree14af3d0f385b34ae6e6d1dbb4eebc6d052faba91 /sys/arch
parent691f6889d5a80e81adc69c2b51694b2ee133ea3c (diff)
oops
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme68k/mvme68k/disksubr.c12
-rw-r--r--sys/arch/mvme88k/mvme88k/disksubr.c10
2 files changed, 7 insertions, 15 deletions
diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c
index 68daab081da..b79deca5fcc 100644
--- a/sys/arch/mvme68k/mvme68k/disksubr.c
+++ b/sys/arch/mvme68k/mvme68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.16 1998/10/03 21:18:55 millert Exp $ */
+/* $OpenBSD: disksubr.c,v 1.17 1998/10/04 23:27:27 millert Exp $ */
/*
* Copyright (c) 1995 Dale Rahn.
@@ -122,13 +122,9 @@ readdisklabel(dev, strat, lp, clp, spoofonly)
if (lp->d_secperunit == 0)
lp->d_secperunit = 0x1fffffff;
lp->d_npartitions = RAW_PART + 1;
- for (i = 0; i < RAW_PART; i++) {
- lp->d_partitions[i].p_size = 0;
- lp->d_partitions[i].p_offset = 0;
- }
- if (lp->d_partitions[0].p_size == 0)
- lp->d_partitions[0].p_size = 0x1fffffff;
- lp->d_partitions[0].p_offset = 0;
+ if (lp->d_partitions[RAW_PART].p_size == 0)
+ lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
+ lp->d_partitions[RAW_PART].p_offset = 0;
/* don't read the on-disk label if we are in spoofed-only mode */
if (spoofonly)
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c
index a0aea8214cc..f0bbd23f15e 100644
--- a/sys/arch/mvme88k/mvme88k/disksubr.c
+++ b/sys/arch/mvme88k/mvme88k/disksubr.c
@@ -80,13 +80,9 @@ readdisklabel(dev, strat, lp, clp, spoofonly)
if (lp->d_secperunit == 0)
lp->d_secperunit = 0x1fffffff;
lp->d_npartitions = RAW_PART + 1;
- for (i = 0; i < RAW_PART; i++) {
- lp->d_partitions[i].p_size = 0;
- lp->d_partitions[i].p_offset = 0;
- }
- if (lp->d_partitions[0].p_size == 0)
- lp->d_partitions[0].p_size = 0x1fffffff;
- lp->d_partitions[0].p_offset = 0;
+ if (lp->d_partitions[RAW_PART].p_size == 0)
+ lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
+ lp->d_partitions[RAW_PART].p_offset = 0;
/* don't read the on-disk label if we are in spoofed-only mode */
if (spoofonly)