From 9b3910f7fe60efb8330b04c558711ead0acff761 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 26 Aug 2011 21:47:26 +0000 Subject: 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. --- sys/arch/vax/vsa/vsbus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/arch/vax') 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", -- cgit v1.2.3