From c8fdb4e9f8a004934c3bba2ae707f47541a81e80 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Wed, 17 May 2006 23:56:04 +0000 Subject: cf_unit should have a value between 0 and cd_ndevs. So set cf_unit to 0 when cd_ndevs is set to 0. "No kidding!" deraadt@ "Seems to make sense to me." beck@ "Seems right." miod@ --- sys/kern/subr_autoconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/kern') diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index f4d98814050..94fa73cf057 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_autoconf.c,v 1.45 2006/05/17 03:43:03 krw Exp $ */ +/* $OpenBSD: subr_autoconf.c,v 1.46 2006/05/17 23:56:03 krw Exp $ */ /* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */ /* @@ -593,6 +593,7 @@ config_detach(struct device *dev, int flags) free(cd->cd_devs, M_DEVBUF); cd->cd_devs = NULL; cd->cd_ndevs = 0; + cf->cf_unit = 0; } #if NHOTPLUG > 0 -- cgit v1.2.3