Change MBR partition type for NetBSD to 0xa9, like the i386 port.
Provide compatibility via COMPAT_386BSD_MBRPART.
This commit is contained in:
parent
6d339338e6
commit
3bb9e75863
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.10 1998/02/24 05:45:51 mycroft Exp $
|
||||
# $NetBSD: GENERIC,v 1.11 1998/03/02 16:18:17 drochner Exp $
|
||||
#
|
||||
# First try for PPC config file
|
||||
#
|
||||
|
@ -35,6 +35,7 @@ options COMPAT_09
|
|||
options COMPAT_10
|
||||
options COMPAT_12
|
||||
options COMPAT_13
|
||||
options COMPAT_386BSD_MBRPART # recognize old partition ID
|
||||
|
||||
file-system FFS
|
||||
file-system MFS
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disklabel.h,v 1.2 1997/04/16 22:55:10 thorpej Exp $ */
|
||||
/* $NetBSD: disklabel.h,v 1.3 1998/03/02 16:18:17 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -61,7 +61,8 @@ struct mbr_partition {
|
|||
|
||||
/* Known partition types: */
|
||||
#define MBR_EXTENDED 0x05 /* Extended partition */
|
||||
#define MBR_NETBSD 0xa5 /* NetBSD partition */
|
||||
#define MBR_NETBSD 0xa9 /* NetBSD partition */
|
||||
#define MBR_386BSD 0xa5 /* 386BSD partition */
|
||||
|
||||
/* For compatibility reasons (mainly for fdisk): */
|
||||
#define dos_partition mbr_partition
|
||||
|
@ -79,7 +80,7 @@ struct mbr_partition {
|
|||
#define DOSPARTOFF MBRPARTOFF
|
||||
#define NDOSPART NMBRPART
|
||||
|
||||
#define DOSPTYP_386BSD MBR_NETBSD
|
||||
#define DOSPTYP_NETBSD MBR_NETBSD
|
||||
|
||||
struct cpu_disklabel {
|
||||
int cd_start; /* Offset to NetBSD partition in blocks */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disksubr.c,v 1.2 1997/03/26 22:43:01 gwr Exp $ */
|
||||
/* $NetBSD: disksubr.c,v 1.3 1998/03/02 16:18:17 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Wolfgang Solfrank.
|
||||
|
@ -181,6 +181,11 @@ mbr_to_label(dev, strat, bno, lp, pnpart, osdep, off)
|
|||
lp, pnpart, osdep, off))
|
||||
goto done;
|
||||
break;
|
||||
#ifdef COMPAT_386BSD_MBRPART
|
||||
case MBR_386BSD:
|
||||
printf("WARNING: old BSD partition ID!\n");
|
||||
/* FALLTHROUGH */
|
||||
#endif
|
||||
case MBR_NETBSD:
|
||||
/* Found the real NetBSD partition, use it */
|
||||
osdep->cd_start = off + get_long(&mp->mbr_start);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ofdev.c,v 1.2 1998/02/22 07:42:31 mycroft Exp $ */
|
||||
/* $NetBSD: ofdev.c,v 1.3 1998/03/02 16:18:17 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -204,7 +204,13 @@ search_label(devp, off, buf, lp, off0)
|
|||
off0 += off;
|
||||
for (p = (struct mbr_partition *)(buf + MBRPARTOFF), i = 4;
|
||||
--i >= 0; p++) {
|
||||
if (p->mbr_type == MBR_NETBSD) {
|
||||
if (p->mbr_type == MBR_NETBSD
|
||||
#ifdef COMPAT_386BSD_MBRPART
|
||||
|| (p->mbr_type == MBR_386BSD &&
|
||||
(printf("WARNING: old BSD partition ID!\n"), 1)
|
||||
/* XXX XXX - libsa printf() is void */ )
|
||||
#endif
|
||||
) {
|
||||
poff = get_long(&p->mbr_start) + off0;
|
||||
if (strategy(devp, F_READ, poff + LABELSECTOR,
|
||||
DEV_BSIZE, buf, &read) == 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.10 1998/02/24 05:45:51 mycroft Exp $
|
||||
# $NetBSD: GENERIC,v 1.11 1998/03/02 16:18:17 drochner Exp $
|
||||
#
|
||||
# First try for PPC config file
|
||||
#
|
||||
|
@ -35,6 +35,7 @@ options COMPAT_09
|
|||
options COMPAT_10
|
||||
options COMPAT_12
|
||||
options COMPAT_13
|
||||
options COMPAT_386BSD_MBRPART # recognize old partition ID
|
||||
|
||||
file-system FFS
|
||||
file-system MFS
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disklabel.h,v 1.2 1997/04/16 22:55:10 thorpej Exp $ */
|
||||
/* $NetBSD: disklabel.h,v 1.3 1998/03/02 16:18:17 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -61,7 +61,8 @@ struct mbr_partition {
|
|||
|
||||
/* Known partition types: */
|
||||
#define MBR_EXTENDED 0x05 /* Extended partition */
|
||||
#define MBR_NETBSD 0xa5 /* NetBSD partition */
|
||||
#define MBR_NETBSD 0xa9 /* NetBSD partition */
|
||||
#define MBR_386BSD 0xa5 /* 386BSD partition */
|
||||
|
||||
/* For compatibility reasons (mainly for fdisk): */
|
||||
#define dos_partition mbr_partition
|
||||
|
@ -79,7 +80,7 @@ struct mbr_partition {
|
|||
#define DOSPARTOFF MBRPARTOFF
|
||||
#define NDOSPART NMBRPART
|
||||
|
||||
#define DOSPTYP_386BSD MBR_NETBSD
|
||||
#define DOSPTYP_NETBSD MBR_NETBSD
|
||||
|
||||
struct cpu_disklabel {
|
||||
int cd_start; /* Offset to NetBSD partition in blocks */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disksubr.c,v 1.2 1997/03/26 22:43:01 gwr Exp $ */
|
||||
/* $NetBSD: disksubr.c,v 1.3 1998/03/02 16:18:17 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Wolfgang Solfrank.
|
||||
|
@ -181,6 +181,11 @@ mbr_to_label(dev, strat, bno, lp, pnpart, osdep, off)
|
|||
lp, pnpart, osdep, off))
|
||||
goto done;
|
||||
break;
|
||||
#ifdef COMPAT_386BSD_MBRPART
|
||||
case MBR_386BSD:
|
||||
printf("WARNING: old BSD partition ID!\n");
|
||||
/* FALLTHROUGH */
|
||||
#endif
|
||||
case MBR_NETBSD:
|
||||
/* Found the real NetBSD partition, use it */
|
||||
osdep->cd_start = off + get_long(&mp->mbr_start);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ofdev.c,v 1.2 1998/02/22 07:42:31 mycroft Exp $ */
|
||||
/* $NetBSD: ofdev.c,v 1.3 1998/03/02 16:18:17 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -204,7 +204,13 @@ search_label(devp, off, buf, lp, off0)
|
|||
off0 += off;
|
||||
for (p = (struct mbr_partition *)(buf + MBRPARTOFF), i = 4;
|
||||
--i >= 0; p++) {
|
||||
if (p->mbr_type == MBR_NETBSD) {
|
||||
if (p->mbr_type == MBR_NETBSD
|
||||
#ifdef COMPAT_386BSD_MBRPART
|
||||
|| (p->mbr_type == MBR_386BSD &&
|
||||
(printf("WARNING: old BSD partition ID!\n"), 1)
|
||||
/* XXX XXX - libsa printf() is void */ )
|
||||
#endif
|
||||
) {
|
||||
poff = get_long(&p->mbr_start) + off0;
|
||||
if (strategy(devp, F_READ, poff + LABELSECTOR,
|
||||
DEV_BSIZE, buf, &read) == 0
|
||||
|
|
Loading…
Reference in New Issue