From 85c68ec88d06cdd8cef7aa0ec05e73f119df8f6c Mon Sep 17 00:00:00 2001 From: cube Date: Sun, 24 Oct 2004 17:06:24 +0000 Subject: [PATCH] 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. --- sys/kern/kern_subr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index d17116636f46..eb612797e1d9 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -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 -__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 @@ int booted_partition; */ #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)