diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-05-17 23:56:04 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-05-17 23:56:04 +0000 |
commit | c8fdb4e9f8a004934c3bba2ae707f47541a81e80 (patch) | |
tree | 1a7ed78484714c9630057dd3ce279977e1ae7102 /sys/kern/subr_autoconf.c | |
parent | c24359dd516c87dc00fe85c7b32463a05d716199 (diff) |
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@
Diffstat (limited to 'sys/kern/subr_autoconf.c')
-rw-r--r-- | sys/kern/subr_autoconf.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |