Add a new ADOS partition type, "RAI?" to specify a RaidFrame partiion
which can then be autoconfigured. Currently can only use the 'c' partition of the raid* device, since there will be no RDB on the device.
This commit is contained in:
parent
1553e3ad3f
commit
23e6dfaccf
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: adosglue.h,v 1.6 2001/02/26 16:07:19 is Exp $ */
|
/* $NetBSD: adosglue.h,v 1.7 2006/08/03 20:29:54 mhitch Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 Christian E. Hopps
|
* Copyright (c) 1994 Christian E. Hopps
|
||||||
|
@ -46,6 +46,7 @@
|
||||||
#define DOST_MUFS 0x6d754600 /* 'muFx' AmigaDos partition (muFS) */
|
#define DOST_MUFS 0x6d754600 /* 'muFx' AmigaDos partition (muFS) */
|
||||||
#define DOST_EXT2 0x4c4e5800 /* 'LNX0' Linux fs partition (ext2fs) */
|
#define DOST_EXT2 0x4c4e5800 /* 'LNX0' Linux fs partition (ext2fs) */
|
||||||
#define DOST_LNXSWP 0x53575000 /* 'SWP0' Linux swap partition */
|
#define DOST_LNXSWP 0x53575000 /* 'SWP0' Linux swap partition */
|
||||||
|
#define DOST_RAID 0x52414900 /* 'RAID' Raidframe partition */
|
||||||
|
|
||||||
struct adostype {
|
struct adostype {
|
||||||
u_char archtype; /* see ADT_xxx below */
|
u_char archtype; /* see ADT_xxx below */
|
||||||
|
@ -60,6 +61,7 @@ struct adostype {
|
||||||
#define ADT_NETBSDUSER 4
|
#define ADT_NETBSDUSER 4
|
||||||
#define ADT_AMIX 5
|
#define ADT_AMIX 5
|
||||||
#define ADT_EXT2 6
|
#define ADT_EXT2 6
|
||||||
|
#define ADT_RAID 7
|
||||||
|
|
||||||
#define ISFSARCH_NETBSD(adt) \
|
#define ISFSARCH_NETBSD(adt) \
|
||||||
((adt).archtype >= ADT_NETBSDROOT && (adt).archtype <= ADT_NETBSDUSER)
|
((adt).archtype >= ADT_NETBSDROOT && (adt).archtype <= ADT_NETBSDUSER)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: disksubr.c,v 1.47 2005/12/11 12:16:26 christos Exp $ */
|
/* $NetBSD: disksubr.c,v 1.48 2006/08/03 20:29:54 mhitch Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
|
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.47 2005/12/11 12:16:26 christos Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.48 2006/08/03 20:29:54 mhitch Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -349,6 +349,7 @@ readdisklabel(dev, strat, lp, clp)
|
||||||
case ADT_AMIGADOS:
|
case ADT_AMIGADOS:
|
||||||
case ADT_AMIX:
|
case ADT_AMIX:
|
||||||
case ADT_EXT2:
|
case ADT_EXT2:
|
||||||
|
case ADT_RAID:
|
||||||
case ADT_UNKNOWN:
|
case ADT_UNKNOWN:
|
||||||
pp = &lp->d_partitions[lp->d_npartitions];
|
pp = &lp->d_partitions[lp->d_npartitions];
|
||||||
break;
|
break;
|
||||||
|
@ -672,6 +673,11 @@ getadostype(dostype)
|
||||||
adt.fstype = FS_EX2FS;
|
adt.fstype = FS_EX2FS;
|
||||||
return(adt);
|
return(adt);
|
||||||
|
|
||||||
|
case DOST_RAID:
|
||||||
|
adt.archtype = ADT_RAID;
|
||||||
|
adt.fstype = FS_RAID;
|
||||||
|
return(adt);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef DIAGNOSTIC
|
#ifdef DIAGNOSTIC
|
||||||
printf("warning unknown dostype: 0x%lx marking unused\n",
|
printf("warning unknown dostype: 0x%lx marking unused\n",
|
||||||
|
|
Loading…
Reference in New Issue