summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-10-10 03:17:46 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-10-10 03:17:46 +0000
commitc2d0836b8e2158302cb1e6a389fe9a561a9e1501 (patch)
treede3368df58051a08e3e3401e51913c527a6528a4 /sys
parentdc8d0c42a03c25fdf64c58d17fc94f81dd2782d7 (diff)
Don't spoof a Free/NetBSD MBR partition as the 'a' partition in a
disklabel. Fixes 'double spoofing' of these partitions as both 'a' and something in the 'i' to 'p' range. OpenBSD changed its MBR partition type to 'A6' eight years ago. As a backward compatibility measure NetBSD and FreeBSD MBR partitions were still spoofed as 'a' partitions when no OpenBSD partition could be found. This bit of backward compatibility is no longer required. 'we can get rid of it' deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/disksubr.c12
-rw-r--r--sys/arch/amd64/amd64/disksubr.c12
-rw-r--r--sys/arch/arm/arm/disksubr.c12
-rw-r--r--sys/arch/hppa/hppa/disksubr.c12
-rw-r--r--sys/arch/hppa64/hppa64/disksubr.c12
-rw-r--r--sys/arch/i386/i386/disksubr.c12
-rw-r--r--sys/arch/landisk/landisk/disksubr.c12
-rw-r--r--sys/arch/macppc/macppc/disksubr.c12
-rw-r--r--sys/arch/mips64/mips64/disksubr.c12
-rw-r--r--sys/arch/mvmeppc/mvmeppc/disksubr.c12
10 files changed, 10 insertions, 110 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c
index 48c155e2325..7321adf2701 100644
--- a/sys/arch/alpha/alpha/disksubr.c
+++ b/sys/arch/alpha/alpha/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.56 2006/10/04 19:01:29 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.57 2006/10/10 03:17:45 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -273,16 +273,6 @@ readdoslabel(bp, strat, lp, osdep, partoffp, cylp, spoofonly)
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)
goto donot;
/*
diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c
index 3048220da78..fc8f15384b4 100644
--- a/sys/arch/amd64/amd64/disksubr.c
+++ b/sys/arch/amd64/amd64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.16 2006/10/04 03:23:01 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.17 2006/10/10 03:17:45 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -132,16 +132,6 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
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)
goto donot;
/*
diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c
index 5bd6847f5ef..14e011bc2cc 100644
--- a/sys/arch/arm/arm/disksubr.c
+++ b/sys/arch/arm/arm/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.14 2006/10/04 03:23:01 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.15 2006/10/10 03:17:45 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -132,16 +132,6 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
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)
goto donot;
/*
diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c
index 10315e52f85..912c18c733b 100644
--- a/sys/arch/hppa/hppa/disksubr.c
+++ b/sys/arch/hppa/hppa/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.36 2006/10/04 23:58:12 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.37 2006/10/10 03:17:45 krw Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -276,16 +276,6 @@ readdoslabel(bp, strat, lp, osdep, partoffp, cylp, spoofonly)
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)
goto donot;
/*
diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c
index 3c30c618682..95dbc857b35 100644
--- a/sys/arch/hppa64/hppa64/disksubr.c
+++ b/sys/arch/hppa64/hppa64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.19 2006/10/04 23:58:12 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.20 2006/10/10 03:17:45 krw Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -272,16 +272,6 @@ readdoslabel(bp, strat, lp, osdep, partoffp, cylp, spoofonly)
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)
goto donot;
/*
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index 5b937788cf9..dc60910e53c 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.58 2006/10/04 03:23:01 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.59 2006/10/10 03:17:45 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -128,16 +128,6 @@ readdisklabel(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)
goto donot;
/*
diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c
index f4e621a6381..1d9cf722ac5 100644
--- a/sys/arch/landisk/landisk/disksubr.c
+++ b/sys/arch/landisk/landisk/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.2 2006/10/06 22:22:31 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.3 2006/10/10 03:17:45 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -132,16 +132,6 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
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)
goto donot;
/*
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c
index 59014a23118..2f22cf0fda2 100644
--- a/sys/arch/macppc/macppc/disksubr.c
+++ b/sys/arch/macppc/macppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.24 2006/10/04 03:23:01 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.25 2006/10/10 03:17:45 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -216,16 +216,6 @@ hfs_done:
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)
goto donot;
/*
diff --git a/sys/arch/mips64/mips64/disksubr.c b/sys/arch/mips64/mips64/disksubr.c
index 3aef50f09ce..c7433bdb1f3 100644
--- a/sys/arch/mips64/mips64/disksubr.c
+++ b/sys/arch/mips64/mips64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.25 2006/10/04 23:58:12 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.26 2006/10/10 03:17:45 krw Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -280,16 +280,6 @@ readdoslabel(bp, strat, lp, osdep, partoffp, cylp, spoofonly)
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)
goto donot;
/*
diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c
index d37069d8e5a..07913f64dd4 100644
--- a/sys/arch/mvmeppc/mvmeppc/disksubr.c
+++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.20 2006/10/04 03:23:01 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.21 2006/10/10 03:17:45 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -135,16 +135,6 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
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)
goto donot;
/*