summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-08-26 21:47:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-08-26 21:47:26 +0000
commit9b3910f7fe60efb8330b04c558711ead0acff761 (patch)
treef32263206f373465a1d4821383888ffa56139346 /sys/arch/vax
parent6677791a7a51ab93b380bb12b02b1e324d9469ab (diff)
Make vsbus_search() return the value of the cf_match function it is a wrapper
for, instead of zero. Makes verbose autoconf output meaningful again.
Diffstat (limited to 'sys/arch/vax')
-rw-r--r--sys/arch/vax/vsa/vsbus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/vax/vsa/vsbus.c b/sys/arch/vax/vsa/vsbus.c
index aa1d3254751..c5059de69cf 100644
--- a/sys/arch/vax/vsa/vsbus.c
+++ b/sys/arch/vax/vsa/vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsbus.c,v 1.21 2010/11/18 21:13:19 miod Exp $ */
+/* $OpenBSD: vsbus.c,v 1.22 2011/08/26 21:47:25 miod Exp $ */
/* $NetBSD: vsbus.c,v 1.29 2000/06/29 07:14:37 mrg Exp $ */
/*
* Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden.
@@ -222,7 +222,7 @@ vsbus_search(parent, cfd, aux)
struct vsbus_softc *sc = (void *)parent;
struct vsbus_attach_args va;
struct cfdata *cf = cfd;
- int i, vec, br;
+ int rc, i, vec, br;
u_char c;
va.va_paddr = cf->cf_loc[0];
@@ -234,13 +234,13 @@ vsbus_search(parent, cfd, aux)
*sc->sc_intclr = 0xff;
scb_vecref(0, 0); /* Clear vector ref */
- i = (*cf->cf_attach->ca_match) (parent, cf, &va);
+ rc = (*cf->cf_attach->ca_match) (parent, cf, &va);
vax_unmap_physmem(va.va_addr, 1);
c = *sc->sc_intreq & ~sc->sc_mask;
- if (i == 0)
+ if (rc == 0)
goto forgetit;
- if (i > 10)
+ if (rc > 10)
c = sc->sc_mask; /* Fooling interrupt */
else if (c == 0)
goto forgetit;
@@ -270,7 +270,7 @@ vsbus_search(parent, cfd, aux)
*sc->sc_intmsk = c; /* Allow interrupts during attach */
config_attach(parent, cf, &va, vsbus_print);
*sc->sc_intmsk = 0;
- return 0;
+ return rc;
fail:
printf("%s%d at %s csr 0x%x %s\n",