diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-12-25 10:32:17 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-12-25 10:32:17 +0000 |
commit | 20e338b14afd240ce3a19d8cd9dbe4063c9b7b29 (patch) | |
tree | c82b86b1b474b9123fb39065a5d53781fba8367d /sys/dev/isa | |
parent | 9e81d6c1eea4f1773dec269833c89f508fe2f518 (diff) |
Avoid infinite loop with busted cards.
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/isapnpres.c | 7 |
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); |