summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-12-22 02:51:26 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-12-22 02:51:26 +0000
commitf75269fefeabcb37f1d4afb80af03b86acc4cd87 (patch)
tree6e8a0e51c5f5e3db506cd80cae55d69cf01c2d3c
parentab3370931574c5463382d7a54fc34c19ab2e7e17 (diff)
Set correct partition offset to 0 when initializing RAW_PART.
ok deraadt@
-rw-r--r--sys/arch/mvme88k/mvme88k/disksubr.c3
-rw-r--r--sys/arch/sparc/sparc/disksubr.c4
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c4
-rw-r--r--sys/arch/vax/vax/disksubr.c4
4 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c
index 27fd747c69f..1b156ce7f02 100644
--- a/sys/arch/mvme88k/mvme88k/disksubr.c
+++ b/sys/arch/mvme88k/mvme88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.28 2005/03/30 07:52:32 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.29 2005/12/22 02:51:24 krw Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -155,6 +155,7 @@ readdisklabel(dev, strat, lp, clp, spoofonly)
}
if (lp->d_partitions[i].p_size == 0)
lp->d_partitions[i].p_size = lp->d_secperunit;
+ lp->d_partitions[i].p_offset = 0;
/* don't read the on-disk label if we are in spoofed-only mode */
if (spoofonly)
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index e10e948260b..4d8cc373e1d 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.32 2005/04/19 21:30:20 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.33 2005/12/22 02:51:25 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */
/*
@@ -161,7 +161,7 @@ readdisklabel(dev, strat, lp, clp, spoofonly)
}
if (lp->d_partitions[i].p_size == 0)
lp->d_partitions[i].p_size = 0x1fffffff;
- lp->d_partitions[0].p_offset = 0;
+ lp->d_partitions[i].p_offset = 0;
lp->d_bbsize = 8192;
lp->d_sbsize = 64*1024; /* XXX ? */
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c
index 2442f8e71d1..983e0a4dded 100644
--- a/sys/arch/sparc64/sparc64/disksubr.c
+++ b/sys/arch/sparc64/sparc64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.14 2005/09/21 21:08:35 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.15 2005/12/22 02:51:25 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */
/*
@@ -102,7 +102,7 @@ readdisklabel(dev, strat, lp, clp, spoofonly)
}
if (lp->d_partitions[i].p_size == 0)
lp->d_partitions[i].p_size = 0x1fffffff;
- lp->d_partitions[0].p_offset = 0;
+ lp->d_partitions[i].p_offset = 0;
lp->d_bbsize = 8192;
lp->d_sbsize = 64*1024; /* XXX ? */
diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c
index 2787d60f0f3..6edaba6eb2c 100644
--- a/sys/arch/vax/vax/disksubr.c
+++ b/sys/arch/vax/vax/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.24 2005/11/12 03:44:24 pedro Exp $ */
+/* $OpenBSD: disksubr.c,v 1.25 2005/12/22 02:51:25 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */
/*
@@ -139,7 +139,7 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
}
if (lp->d_partitions[i].p_size == 0)
lp->d_partitions[i].p_size = 0x1fffffff;
- lp->d_partitions[0].p_offset = 0;
+ lp->d_partitions[i].p_offset = 0;
lp->d_bbsize = 8192;
lp->d_sbsize = 64 * 1024;