summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-10-12 00:25:21 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-10-12 00:25:21 +0000
commit1eee43099356da9c6aa1e08d66c50f951088433d (patch)
tree79ab2cb63bcedb0425fe9dac8b2bae67814d76a4 /sys/arch
parentb3e0f59f6a1b88f413155ed43999863b9044ca07 (diff)
Since we no longer look in FreeBSD or NetBSD partitions for the
disklabel, we shouldn't write the disklabel in such partitions either. Brings amd64, arm, i386, landisk, macppc, mvmeppc (which roll their own MBR search in writedisklabel()) into line with alpha, hppa, hppa64, mips64 (which use readdoslabel() in both reading and writing the disklabel). If all goes well, soon everyone will be using readdoslabel().
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/disksubr.c8
-rw-r--r--sys/arch/arm/arm/disksubr.c8
-rw-r--r--sys/arch/i386/i386/disksubr.c8
-rw-r--r--sys/arch/landisk/landisk/disksubr.c8
-rw-r--r--sys/arch/macppc/macppc/disksubr.c10
-rw-r--r--sys/arch/mvmeppc/mvmeppc/disksubr.c8
6 files changed, 6 insertions, 44 deletions
diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c
index fc8f15384b4..a69436e2847 100644
--- a/sys/arch/amd64/amd64/disksubr.c
+++ b/sys/arch/amd64/amd64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.17 2006/10/10 03:17:45 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.18 2006/10/12 00:25:19 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -376,12 +376,6 @@ writedisklabel(dev, strat, lp, osdep)
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
- ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
- ourpart = i;
if (ourpart != -1) {
dp2 = &dp[ourpart];
diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c
index 14e011bc2cc..db214fd2551 100644
--- a/sys/arch/arm/arm/disksubr.c
+++ b/sys/arch/arm/arm/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.15 2006/10/10 03:17:45 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.16 2006/10/12 00:25:19 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -375,12 +375,6 @@ writedisklabel(dev, strat, lp, osdep)
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
- ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
- ourpart = i;
if (ourpart != -1) {
dp2 = &dp[ourpart];
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index dc60910e53c..a416edda3af 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.59 2006/10/10 03:17:45 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.60 2006/10/12 00:25:20 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -367,12 +367,6 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
- ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
- ourpart = i;
if (ourpart != -1) {
dp2 = &dp[ourpart];
diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c
index 1d9cf722ac5..6c21b778da0 100644
--- a/sys/arch/landisk/landisk/disksubr.c
+++ b/sys/arch/landisk/landisk/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.3 2006/10/10 03:17:45 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.4 2006/10/12 00:25:20 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -375,12 +375,6 @@ writedisklabel(dev, strat, lp, osdep)
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
- ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
- ourpart = i;
if (ourpart != -1) {
dp2 = &dp[ourpart];
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c
index 2f22cf0fda2..9448a263fb7 100644
--- a/sys/arch/macppc/macppc/disksubr.c
+++ b/sys/arch/macppc/macppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.25 2006/10/10 03:17:45 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.26 2006/10/12 00:25:20 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -480,14 +480,6 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
if (letoh32(dp2->dp_size) && dp2->dp_typ ==
DOSPTYP_OPENBSD)
ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ ==
- DOSPTYP_FREEBSD)
- ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ ==
- DOSPTYP_NETBSD)
- ourpart = i;
if (ourpart != -1) {
dp2 = &dp[ourpart];
diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c
index 07913f64dd4..c76072cd392 100644
--- a/sys/arch/mvmeppc/mvmeppc/disksubr.c
+++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.21 2006/10/10 03:17:45 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.22 2006/10/12 00:25:20 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -376,12 +376,6 @@ writedisklabel(dev, strat, lp, osdep)
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
- ourpart = i;
- for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
- ourpart = i;
if (ourpart != -1) {
dp2 = &dp[ourpart];