summaryrefslogtreecommitdiff
path: root/sys/dev/isa/isapnpres.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-12-25 10:32:17 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-12-25 10:32:17 +0000
commit20e338b14afd240ce3a19d8cd9dbe4063c9b7b29 (patch)
treec82b86b1b474b9123fb39065a5d53781fba8367d /sys/dev/isa/isapnpres.c
parent9e81d6c1eea4f1773dec269833c89f508fe2f518 (diff)
Avoid infinite loop with busted cards.
Diffstat (limited to 'sys/dev/isa/isapnpres.c')
-rw-r--r--sys/dev/isa/isapnpres.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/isa/isapnpres.c b/sys/dev/isa/isapnpres.c
index 879c9c39ed0..33d9a2049b3 100644
--- a/sys/dev/isa/isapnpres.c
+++ b/sys/dev/isa/isapnpres.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isapnpres.c,v 1.2 1997/12/25 09:22:42 downsj Exp $ */
+/* $OpenBSD: isapnpres.c,v 1.3 1997/12/25 10:32:16 downsj Exp $ */
/* $NetBSD: isapnpres.c,v 1.7.4.1 1997/11/20 07:46:13 mellon Exp $ */
/*
@@ -508,9 +508,12 @@ parse:
goto bad;
}
- if (isapnp_process_tag(tag, len, buf, &card, &dev, &conf) == -1)
+ if (isapnp_process_tag(tag, len, buf, &card, &dev, &conf) == -1) {
printf("%s: No current device for tag, card %d\n",
sc->sc_dev.dv_xname, c + 1);
+ if (++warned == 10)
+ goto bad;
+ }
}
while (tag != ISAPNP_TAG_END);
return isapnp_flatten(card);