summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-19 20:36:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-19 20:36:45 +0000
commitddc2bdf6cf5ce3bdbe1a0143306e59f839c48ecf (patch)
tree2f348b4eac2a9072aa2061a26c0b33cc9a0c43ae /sys/arch/i386
parent70c7ae29f65f33ad5dab03ec18ab6eda17bcc47d (diff)
add netbsd partition, rename 386BSD one to FreeBSD..
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/disksubr.c14
-rw-r--r--sys/arch/i386/include/disklabel.h6
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index fde6ce763dd..de3e3d7d5fb 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.30 1998/01/11 20:42:06 provos Exp $ */
+/* $OpenBSD: disksubr.c,v 1.31 1998/02/19 20:36:40 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -145,7 +145,12 @@ readdisklabel(dev, strat, lp, osdep)
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1;
i++, dp2++)
if (get_le(&dp2->dp_size) &&
- dp2->dp_typ == DOSPTYP_386BSD)
+ dp2->dp_typ == DOSPTYP_FREEBSD)
+ ourpart = i;
+ for (dp2=dp, i=0; i < NDOSPART && ourpart == -1;
+ i++, dp2++)
+ if (get_le(&dp2->dp_size) &&
+ dp2->dp_typ == DOSPTYP_NETBSD)
ourpart = i;
if (ourpart == -1)
goto donot;
@@ -413,7 +418,10 @@ writedisklabel(dev, strat, lp, osdep)
if (get_le(&dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (get_le(&dp2->dp_size) && dp2->dp_typ == DOSPTYP_386BSD)
+ if (get_le(&dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
+ ourpart = i;
+ for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
+ if (get_le(&dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
ourpart = i;
if (ourpart != -1) {
diff --git a/sys/arch/i386/include/disklabel.h b/sys/arch/i386/include/disklabel.h
index 1180aca11e5..e929785d36f 100644
--- a/sys/arch/i386/include/disklabel.h
+++ b/sys/arch/i386/include/disklabel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.h,v 1.17 1998/01/11 20:42:00 provos Exp $ */
+/* $OpenBSD: disklabel.h,v 1.18 1998/02/19 20:36:31 deraadt Exp $ */
/* $NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp $ */
/*
@@ -68,9 +68,9 @@ struct dos_partition {
#define DOSPTYP_FAT16C 0x0e /* 16-bit FAT, CHS-mapped */
#define DOSPTYP_ONTRACK 0x54
#define DOSPTYP_LINUX 0x83 /* That other thing */
-#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */
-#define DOSPTYP_NETBSD DOSPTYP_386BSD /* NetBSD partition type (XXX) */
+#define DOSPTYP_FREEBSD 0xa5 /* FreeBSD partition type */
#define DOSPTYP_OPENBSD 0xa6 /* OpenBSD partition type */
+#define DOSPTYP_NETBSD 0xa9 /* NetBSD partition type */
struct dos_mbr {
u_int8_t dmbr_boot[DOSPARTOFF];