update for the fact that config_found() and config_rootfound() now

return pointers.  (Check vs. NULL, rather than just boolean tests.)
This commit is contained in:
cgd 1996-04-04 06:25:00 +00:00
parent fbce6d4468
commit 83f9bdc359
19 changed files with 43 additions and 43 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.1 1995/02/13 23:06:49 cgd Exp $ */
/* $NetBSD: autoconf.c,v 1.2 1996/04/04 06:25:00 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -47,7 +47,7 @@ configure()
extern int cold;
(void)splhigh();
if (config_rootfound("mainbus", "mainbus") == 0)
if (config_rootfound("mainbus", "mainbus") == NULL)
panic("no mainbus found");
(void)spl0();

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.7 1996/03/17 01:06:21 thorpej Exp $ */
/* $NetBSD: mainbus.c,v 1.8 1996/04/04 06:25:02 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -116,7 +116,7 @@ mbattach(parent, self, aux)
nca.ca_slot = 0;
nca.ca_offset = 0;
nca.ca_bus = &sc->sc_bus;
if (config_found(self, &nca, mbprint))
if (config_found(self, &nca, mbprint) != NULL)
cpuattachcnt++;
}
if (ncpus != cpuattachcnt)

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.30 1996/03/17 01:16:48 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.31 1996/04/04 06:25:07 cgd Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -61,7 +61,7 @@ configure()
amiga_realconfig = 1;
custom.intena = INTF_INTEN;
if (config_rootfound("mainbus", "mainbus") == 0)
if (config_rootfound("mainbus", "mainbus") == NULL)
panic("no mainbus found");
custom.intena = INTF_SETCLR | INTF_INTEN;
@ -120,7 +120,7 @@ amiga_config_found(pcfp, pdp, auxp, pfn)
struct cfdata *cf;
if (amiga_realconfig)
return(config_found(pdp, auxp, pfn));
return(config_found(pdp, auxp, pfn) != NULL);
if (pdp == NULL)
pdp = &temp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.7 1996/03/20 12:41:30 leo Exp $ */
/* $NetBSD: autoconf.c,v 1.8 1996/04/04 06:25:15 cgd Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@ -61,7 +61,7 @@ configure()
atari_realconfig = 1;
if (config_rootfound("mainbus", "mainbus") == 0)
if (config_rootfound("mainbus", "mainbus") == NULL)
panic("no mainbus found");
#ifdef GENERIC
@ -102,7 +102,7 @@ atari_config_found(pcfp, pdp, auxp, pfn)
extern int atari_realconfig;
if (atari_realconfig)
return(config_found(pdp, auxp, pfn));
return(config_found(pdp, auxp, pfn) != NULL);
if (pdp == NULL)
pdp = &temp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pccons.c,v 1.94 1996/03/30 07:51:51 mycroft Exp $ */
/* $NetBSD: pccons.c,v 1.95 1996/04/04 06:25:22 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum. All rights reserved.
@ -484,7 +484,7 @@ pcattach(parent, self, aux)
* XXX Really should decouple keyboard controller
* from the console code.
*/
while (config_found(self, NULL, NULL))
while (config_found(self, NULL, NULL) != NULL)
/* will break when no more children */ ;
}

View File

@ -344,7 +344,7 @@ pcattach(struct isa_device *dev)
* XXX Really should decouple keyboard controller
* from the console code.
*/
while (config_found(self, NULL, NULL))
while (config_found(self, NULL, NULL) != NULL)
/* will break when no more children */ ;
#endif /* PCVT_NETBSD > 110 */
#else /* PCVT_NETBSD > 100 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.26 1996/04/04 00:27:29 cgd Exp $ */
/* $NetBSD: autoconf.c,v 1.27 1996/04/04 06:25:36 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -148,7 +148,7 @@ configure(void)
/* startrtclock(); swapped with adb_init (WRU) */
if (config_rootfound("mainbus", "mainbus") == 0)
if (config_rootfound("mainbus", "mainbus") == NULL)
panic("No main device!");
#if GENERIC
@ -428,7 +428,7 @@ mainbus_attach(parent, self, aux)
printf("\n");
for (c=conf_data ; c->name ; c++) {
if (config_found(self, c, mbprint)) {
if (config_found(self, c, mbprint) != NULL) {
} else {
if (c->req) {
fail++;

View File

@ -1,4 +1,4 @@
/* $Id: iio.c,v 1.2 1996/03/17 01:35:02 thorpej Exp $ */
/* $Id: iio.c,v 1.3 1996/04/04 06:25:40 cgd Exp $ */
/*
*
@ -103,7 +103,7 @@ iioattach(parent, self, args)
panic("no pcc device configured");
config_attach(self, pcccf, NULL, NULL);
while (config_found(self, NULL, NULL))
while (config_found(self, NULL, NULL) != NULL)
;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.3 1996/03/17 01:35:07 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.4 1996/04/04 06:25:45 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -105,7 +105,7 @@ mainbus_attach(parent, self, args)
{
printf("\n");
while (config_found(self, NULL, NULL))
while (config_found(self, NULL, NULL) != NULL)
;
}
/*
@ -116,7 +116,7 @@ configure()
init_sir();
isrinit();
if (!config_rootfound("mainbus", NULL))
if (config_rootfound("mainbus", NULL) == NULL)
panic("autoconfig failed, no root");
#if GENERIC

View File

@ -24,6 +24,6 @@ mainbus_attach(parent, self, args)
struct device *parent, *self;
void *args;
{
while (config_found(self, NULL, NULL))
while (config_found(self, NULL, NULL) != NULL)
;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.17 1996/03/17 01:39:07 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.18 1996/04/04 06:25:48 cgd Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -77,7 +77,7 @@ configure()
startrtclock();
/* Find out what the hardware configuration looks like! */
if (config_rootfound("membus", "membus") == 0)
if (config_rootfound("membus", "membus") == NULL)
panic ("No mem bus found!");
for (i = 0; i < NIPL; i++)
@ -227,6 +227,6 @@ membusattach(parent, self, args)
void *args;
{
printf ("\n");
while (config_found(self, NULL, NULL))
while (config_found(self, NULL, NULL) != NULL)
;
}

View File

@ -38,7 +38,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
* $Id: autoconf.c,v 1.1.1.1 1996/03/13 04:58:10 jonathan Exp $
* $Id: autoconf.c,v 1.2 1996/04/04 06:25:51 cgd Exp $
*/
/*
@ -75,7 +75,7 @@ extern int pica_boardtype;
configure()
{
(void)splhigh(); /* To be really shure.. */
if(config_rootfound("mainbus", "mainbus") == 0)
if(config_rootfound("mainbus", "mainbus") == NULL)
panic("no mainbus found");
(void)spl0();

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.14 1995/12/28 19:16:58 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.15 1996/04/04 06:25:54 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -171,7 +171,7 @@ configure()
* Kick off autoconfiguration
*/
s = splhigh();
if (config_rootfound("mainbus", "mainbus") == 0)
if (config_rootfound("mainbus", "mainbus") == NULL)
panic("no mainbus found");
#if 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.3 1996/03/17 01:47:04 thorpej Exp $ */
/* $NetBSD: cpu.c,v 1.4 1996/04/04 06:25:58 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -90,7 +90,7 @@ cpuattach(parent, dev, aux)
nca.ca_name = "kn01";
nca.ca_slot = 0;
nca.ca_offset = 0;
if (!config_found(dev, &nca, cpuprint))
if (config_found(dev, &nca, cpuprint) == NULL)
panic("cpuattach: couldn't attach LCA bus interface");
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.8 1996/03/18 01:47:06 jonathan Exp $ */
/* $NetBSD: mainbus.c,v 1.9 1996/04/04 06:26:00 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -124,7 +124,7 @@ mbattach(parent, self, aux)
nca.ca_slot = 0;
nca.ca_offset = 0;
nca.ca_addr = 0;
if (config_found(self, &nca, mbprint))
if (config_found(self, &nca, mbprint) != NULL)
cpuattachcnt++;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.49 1996/04/04 00:27:24 cgd Exp $ */
/* $NetBSD: autoconf.c,v 1.50 1996/04/04 06:26:06 cgd Exp $ */
/*
* Copyright (c) 1996
@ -881,7 +881,7 @@ configure()
oca.ca_ra.ra_node = node;
oca.ca_ra.ra_name = cp = "mainbus";
if (!config_rootfound(cp, (void *)&oca))
if (config_rootfound(cp, (void *)&oca) == NULL)
panic("mainbus not configured");
(void)spl0();
@ -1161,7 +1161,7 @@ mainbus_attach(parent, dev, aux)
oca.ca_bustype = BUS_MAIN;
oca.ca_ra.ra_name = "obio";
if (!config_found(dev, (void *)&oca, mbprint))
if (config_found(dev, (void *)&oca, mbprint) == NULL)
panic("obio missing");
for (ssp = oldmon_special; (sp = *ssp) != NULL; ssp++) {
@ -1228,7 +1228,7 @@ mainbus_attach(parent, dev, aux)
}
oca.ca_bustype = BUS_MAIN;
if (!romprop(&oca.ca_ra, sp, node) ||
!config_found(dev, (void *)&oca, mbprint))
(config_found(dev, (void *)&oca, mbprint) == NULL))
panic(sp);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.35 1996/03/26 15:16:24 gwr Exp $ */
/* $NetBSD: zs.c,v 1.36 1996/04/04 06:26:15 cgd Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@ -296,7 +296,7 @@ zsc_attach(parent, self, aux)
*/
zsc_args.channel = channel;
zsc_args.hwflags = zs_hwflags[zsc_unit][channel];
if (!config_found(self, (void *) &zsc_args, zsc_print)) {
if (config_found(self, (void *)&zsc_args, zsc_print) == NULL) {
/* No sub-driver. Just reset it. */
reset = (channel == 0) ?
ZSWR9_A_RESET : ZSWR9_B_RESET;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.31 1996/03/26 15:16:39 gwr Exp $ */
/* $NetBSD: autoconf.c,v 1.32 1996/04/04 06:26:19 cgd Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@ -71,7 +71,7 @@ void configure()
int root_found;
/* General device autoconfiguration. */
root_found = config_rootfound("mainbus", NULL);
root_found = (config_rootfound("mainbus", NULL) != NULL);
if (!root_found)
panic("configure: mainbus not found");

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.10 1996/03/17 22:56:25 ragge Exp $ */
/* $NetBSD: autoconf.c,v 1.11 1996/04/04 06:26:23 cgd Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -166,7 +166,7 @@ configure()
extern int boothowto;
if (!config_rootfound("backplane", NULL))
if (config_rootfound("backplane", NULL) == NULL)
panic("backplane not configured");
#if GENERIC