From 0666ca366e40b2b69eb3c30d67d2660a2c8f960f Mon Sep 17 00:00:00 2001 From: cube Date: Wed, 1 Mar 2006 22:12:09 +0000 Subject: [PATCH] Fix md(4) like raid(4) was fixed. --- sys/conf/files | 4 ++-- sys/kern/kern_subr.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index b8563c65bb6d..498d3f6831ba 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.762 2006/02/25 01:32:10 christos Exp $ +# $NetBSD: files,v 1.763 2006/03/01 22:12:09 cube Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -1066,7 +1066,7 @@ defpseudo vnd { }: disk defflag opt_vnd.h VND_COMPRESSION defpseudo ccd: disk defpseudo cgd: disk, des, blowfish, cast128, rijndael -defpseudo md: disk +defpseudo md { }: disk defpseudo fss: disk defpseudo pty: tty diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index dcba13c08d51..d0c15aa95fd4 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_subr.c,v 1.126 2006/03/01 12:38:21 yamt Exp $ */ +/* $NetBSD: kern_subr.c,v 1.127 2006/03/01 22:12:09 cube Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.126 2006/03/01 12:38:21 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.127 2006/03/01 22:12:09 cube Exp $"); #include "opt_ddb.h" #include "opt_md.h" @@ -743,6 +743,7 @@ dopowerhooks(int why) #ifdef MEMORY_DISK_HOOKS static struct device fakemdrootdev[NMD]; +extern struct cfdriver md_cd; #endif #ifdef MEMORY_DISK_IS_ROOT @@ -798,6 +799,7 @@ setroot(struct device *bootdv, int bootpartition) for (i = 0; i < NMD; i++) { fakemdrootdev[i].dv_class = DV_DISK; fakemdrootdev[i].dv_cfdata = NULL; + fakemdrootdev[i].dv_cfdriver = &md_cd; fakemdrootdev[i].dv_unit = i; fakemdrootdev[i].dv_parent = NULL; snprintf(fakemdrootdev[i].dv_xname,