summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1998-10-04 23:27:27 +0000
committermillert <millert@openbsd.org>1998-10-04 23:27:27 +0000
commitfd073169db4c7e461a2456e1c9d3e131d06e2e36 (patch)
tree5c1be31f56c9947260ffd2ce90305fa9d3f01f42
parentNo more name clashes since ed disappeared from the isa world (diff)
downloadwireguard-openbsd-fd073169db4c7e461a2456e1c9d3e131d06e2e36.tar.xz
wireguard-openbsd-fd073169db4c7e461a2456e1c9d3e131d06e2e36.zip
oops
-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)