diff options
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/isa/isa.c | 24 | ||||
| -rw-r--r-- | sys/kern/subr_autoconf.c | 19 |
2 files changed, 19 insertions, 24 deletions
diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c index c11c6744fb2..2a3e514e0fc 100644 --- a/sys/dev/isa/isa.c +++ b/sys/dev/isa/isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa.c,v 1.28 1998/01/20 18:40:28 niklas Exp $ */ +/* $OpenBSD: isa.c,v 1.29 1998/01/20 19:05:05 niklas Exp $ */ /* $NetBSD: isa.c,v 1.85 1996/05/14 00:31:04 thorpej Exp $ */ /* @@ -79,8 +79,6 @@ int isamatch __P((struct device *, void *, void *)); void isaattach __P((struct device *, struct device *, void *)); -extern int autoconf_verbose; - struct cfattach isa_ca = { sizeof(struct isa_softc), isamatch, isaattach }; @@ -203,14 +201,7 @@ isascan(parent, match) if (cf->cf_fstate == FSTATE_STAR) { struct isa_attach_args ia2 = ia; - if (autoconf_verbose) - printf(">>> probing for %s*\n", - cf->cf_driver->cd_name); while ((*cf->cf_attach->ca_match)(parent, dev, &ia2) > 0) { - if (autoconf_verbose) - printf(">>> probe for %s* clone into %s%d\n", - cf->cf_driver->cd_name, - cf->cf_driver->cd_name, cf->cf_unit); if (ia2.ia_iosize == 0x666) { printf("%s: iosize not repaired by driver\n", sc->sc_dev.dv_xname); @@ -225,30 +216,19 @@ isascan(parent, match) ISA_DRQ_ALLOC((struct device *)sc, ia.ia_drq); #endif /* NISAMDA > 0 */ } - if (autoconf_verbose) - printf(">>> probing for %s* finished\n", - cf->cf_driver->cd_name); free(dev, M_DEVBUF); return; } - if (autoconf_verbose) - printf(">>> probing for %s%d\n", cf->cf_driver->cd_name, - cf->cf_unit); if ((*cf->cf_attach->ca_match)(parent, dev, &ia) > 0) { - printf(">>> probing for %s%d succeeded\n", - cf->cf_driver->cd_name, cf->cf_unit); config_attach(parent, dev, &ia, isaprint); #if NISADMA > 0 if (ia.ia_drq != DRQUNK) ISA_DRQ_ALLOC((struct device *)sc, ia.ia_drq); #endif /* NISAMDA > 0 */ - } else { - printf(">>> probing for %s%d failed\n", - cf->cf_driver->cd_name, cf->cf_unit); + } else free(dev, M_DEVBUF); - } } char * diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index aab721b606e..e74ea78eeac 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_autoconf.c,v 1.16 1997/11/23 08:22:47 mickey Exp $ */ +/* $OpenBSD: subr_autoconf.c,v 1.17 1998/01/20 19:05:02 niklas Exp $ */ /* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */ /* @@ -85,6 +85,11 @@ static struct cftable staticcftable = { cfdata }; +#ifndef AUTOCONF_VERBOSE +#define AUTOCONF_VERBOSE 0 +#endif /* AUTOCONF_VERBOSE */ +int autoconf_verbose = AUTOCONF_VERBOSE; /* trace probe calls */ + static char *number __P((char *, int)); static void mapply __P((struct matchinfo *, struct cfdata *)); @@ -123,6 +128,9 @@ mapply(m, cf) else match = cf; + if (autoconf_verbose) + printf(">>> probing for %s%d\n", cf->cf_driver->cd_name, + cf->cf_unit); if (m->fn != NULL) pri = (*m->fn)(m->parent, match, m->aux); else { @@ -132,6 +140,9 @@ mapply(m, cf) } pri = (*cf->cf_attach->ca_match)(m->parent, match, m->aux); } + if (autoconf_verbose) + printf(">>> probe for %s%d returned %d\n", + cf->cf_driver->cd_name, cf->cf_unit, pri); if (pri > m->pri) { if (m->indirect && m->match) @@ -189,6 +200,10 @@ config_search(fn, parent, aux) mapply(&m, cf); } } + if (autoconf_verbose) + printf(">>> probe for %s%d won\n", + ((struct cfdata *)match)->cf_driver->cd_name, + ((struct cfdata *)match)->cf_unit); return (m.match); } @@ -287,7 +302,7 @@ config_found_sm(parent, aux, print, submatch) { void *match; - if ((match = config_search(submatch, parent, aux)) != NULL) + if ((match = config_search(submatch, parent, aux)) != NULL) { return (config_attach(parent, match, aux, print)); if (print) printf(msgs[(*print)(aux, parent->dv_xname)]); |
