Kill more broken cf_unit bogons.
This commit is contained in:
parent
21eb44e2ba
commit
8bc084e1de
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aucc.c,v 1.24 1999/03/04 20:45:01 is Exp $ */
|
||||
/* $NetBSD: aucc.c,v 1.25 2000/03/16 16:37:20 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Bernardo Innocenti
|
||||
@ -269,14 +269,17 @@ auccmatch(pdp, cfp, aux)
|
||||
struct cfdata *cfp;
|
||||
void *aux;
|
||||
{
|
||||
if (matchname((char *)aux, "aucc") &&
|
||||
#ifdef DRACO
|
||||
!is_draco() &&
|
||||
#endif
|
||||
(cfp->cf_unit == 0))
|
||||
return 1;
|
||||
static int aucc_matched = 0;
|
||||
|
||||
return 0;
|
||||
if (!matchname((char *)aux, "aucc") ||
|
||||
#ifdef DRACO
|
||||
is_draco() ||
|
||||
#endif
|
||||
aucc_matched)
|
||||
return 0;
|
||||
|
||||
aucc_matched = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: drbbc.c,v 1.5 1999/03/14 22:42:12 is Exp $ */
|
||||
/* $NetBSD: drbbc.c,v 1.6 2000/03/16 16:37:20 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -83,10 +83,14 @@ drbbc_match(pdp, cfp, auxp)
|
||||
struct cfdata *cfp;
|
||||
void *auxp;
|
||||
{
|
||||
if (is_draco() && matchname(auxp, "drbbc") && (cfp->cf_unit == 0))
|
||||
return (1);
|
||||
else
|
||||
static int drbbc_matched = 0;
|
||||
|
||||
/* Allow only one instance. */
|
||||
if (!is_draco() || !matchname(auxp, "drbbc") || drbbc_matched)
|
||||
return (0);
|
||||
|
||||
drbbc_matched = 1;
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: drsc.c,v 1.16 2000/01/16 21:19:44 is Exp $ */
|
||||
/* $NetBSD: drsc.c,v 1.17 2000/03/16 16:37:20 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Ignatios Souvatzis
|
||||
@ -89,9 +89,14 @@ drscmatch(pdp, cfp, auxp)
|
||||
struct cfdata *cfp;
|
||||
void *auxp;
|
||||
{
|
||||
if (is_draco() && matchname(auxp, "drsc") && (cfp->cf_unit == 0))
|
||||
return(1);
|
||||
return(0);
|
||||
static int drsc_matched = 0;
|
||||
|
||||
/* Allow only one instance. */
|
||||
if (!is_draco() || !matchname(auxp, "drsc") || drsc_matched)
|
||||
return (0);
|
||||
|
||||
drsc_matched = 1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: drsupio.c,v 1.7 1999/12/30 20:56:45 is Exp $ */
|
||||
/* $NetBSD: drsupio.c,v 1.8 2000/03/16 16:37:20 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -77,13 +77,14 @@ drsupiomatch(parent, cfp, auxp)
|
||||
struct cfdata *cfp;
|
||||
void *auxp;
|
||||
{
|
||||
static int drsupio_matched = 0;
|
||||
|
||||
/* Exactly one of us lives on the DraCo */
|
||||
if (!is_draco() || !matchname(auxp, "drsupio") || drsupio_matched)
|
||||
return 0;
|
||||
|
||||
if (is_draco() && matchname(auxp, "drsupio") && (cfp->cf_unit == 0))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
drsupio_matched = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct drsupio_devs {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.43 2000/02/07 20:16:48 thorpej Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.44 2000/03/16 16:37:20 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -310,13 +310,17 @@ fdcmatch(pdp, cfp, auxp)
|
||||
struct cfdata *cfp;
|
||||
void *auxp;
|
||||
{
|
||||
static int fdc_matched = 0;
|
||||
|
||||
if (matchname("fdc", auxp) == 0 || cfp->cf_unit != 0)
|
||||
/* Allow only once instance. */
|
||||
if (matchname("fdc", auxp) == 0 || fdc_matched)
|
||||
return(0);
|
||||
if ((fdc_dmap = alloc_chipmem(DMABUFSZ)) == NULL) {
|
||||
printf("fdc: unable to allocate dma buffer\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
fdc_matched = 1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
@ -362,15 +366,14 @@ fdmatch(pdp, cfp, auxp)
|
||||
struct cfdata *cfp;
|
||||
void *auxp;
|
||||
{
|
||||
|
||||
#define cf_unit cf_loc[FDCCF_UNIT]
|
||||
struct fdcargs *fdap;
|
||||
|
||||
fdap = auxp;
|
||||
if (cfp->cf_unit == fdap->unit || cfp->cf_unit == FDCCF_UNIT_DEFAULT)
|
||||
if (cfp->cf_loc[FDCCF_UNIT] == fdap->unit ||
|
||||
cfp->cf_loc[FDCCF_UNIT] == FDCCF_UNIT_DEFAULT)
|
||||
return(1);
|
||||
|
||||
return(0);
|
||||
#undef cf_unit
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: par.c,v 1.18 1999/08/05 18:08:09 thorpej Exp $ */
|
||||
/* $NetBSD: par.c,v 1.19 2000/03/16 16:37:20 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1990 The Regents of the University of California.
|
||||
@ -112,10 +112,13 @@ parmatch(pdp, cfp, auxp)
|
||||
struct cfdata *cfp;
|
||||
void *auxp;
|
||||
{
|
||||
static int par_found = 0;
|
||||
|
||||
if (matchname((char *)auxp, "par") && cfp->cf_unit == 0)
|
||||
return(1);
|
||||
return(0);
|
||||
if (!matchname((char *)auxp, "par") || par_found)
|
||||
return(0);
|
||||
|
||||
par_found = 1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ser.c,v 1.49 1998/07/22 19:13:02 is Exp $ */
|
||||
/* $NetBSD: ser.c,v 1.50 2000/03/16 16:37:21 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -181,11 +181,15 @@ sermatch(pdp, cfp, auxp)
|
||||
struct cfdata *cfp;
|
||||
void *auxp;
|
||||
{
|
||||
static int ser_matched = 0;
|
||||
|
||||
if (matchname("ser", (char *)auxp) == 0 || cfp->cf_unit != 0)
|
||||
/* Allow only once instance. */
|
||||
if (matchname("ser", (char *)auxp) == 0 || ser_matched)
|
||||
return(0);
|
||||
if (serconsole != 0 && amiga_realconfig == 0)
|
||||
return(0);
|
||||
|
||||
ser_matched = 1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user