Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Add a check in DEV_USES_PARTITIONS macro in case dv...



details:   https://anonhg.NetBSD.org/src/rev/751dd0d05d78
branches:  trunk
changeset: 570701:751dd0d05d78
user:      cube <cube%NetBSD.org@localhost>
date:      Sun Oct 24 17:06:24 2004 +0000

description:
Add a check in DEV_USES_PARTITIONS macro in case dv->dv_cfdata is NULL,
as it is the case for md and raid. Raid case tested by Martin Husemann,
I could test the install floppies work again.

diffstat:

 sys/kern/kern_subr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r d95ab82c4116 -r 751dd0d05d78 sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c      Sun Oct 24 17:01:22 2004 +0000
+++ b/sys/kern/kern_subr.c      Sun Oct 24 17:06:24 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_subr.c,v 1.113 2004/10/23 17:14:11 thorpej Exp $  */
+/*     $NetBSD: kern_subr.c,v 1.114 2004/10/24 17:06:24 cube Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc.
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.113 2004/10/23 17:14:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.114 2004/10/24 17:06:24 cube Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -772,7 +772,8 @@
  */
 #define        DEV_USES_PARTITIONS(dv)                                         \
        ((dv)->dv_class == DV_DISK &&                                   \
-        strcmp((dv)->dv_cfdata->cf_name, "dk") != 0)
+       ((dv)->dv_cfdata == NULL ||                                     \
+        strcmp((dv)->dv_cfdata->cf_name, "dk") != 0))
 
 void
 setroot(bootdv, bootpartition)



Home | Main Index | Thread Index | Old Index