Subject: Re: prototype in GENERIC for APC UPS?
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/23/2007 11:41:05
--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 23, 2007 at 10:57:46AM -0400, Steven M. Bellovin wrote:
> On Mon, 23 Apr 2007 16:50:29 +0200
> Martin Husemann <martin@duskware.de> wrote:
>=20
> > On Mon, Apr 23, 2007 at 10:43:12AM -0400, Steven M. Bellovin wrote:
> > >=20
> > > 	# Detect APC UPS as ugen instead of uhid
> > > 	#ugen*   at uhub? port ? vendor "0x051d" flags 1
> > >=20
> > > and perhaps others if appropriate.
> >=20
> > Why don't we have a list inside ugen.c that it matches against the
> > device and returns UMATCH_GENERIC+1 if it finds a known "this should
> > be ugen" device?
> >=20
> Wouldn't we have to change a bit more?  Ugen is currently scanned
> last, I thought; for that, we'd have to have it scanned first for
> cases like these, and again at the end for devices not matched by
> something else, right?

It's not supposed to matter. Our autoconfig code supports the concept of=20
quality of match. The first "best" match wins. That means that if a match=
=20
routine returns better than the previous best match code, it becomes the=20
match, otherwise things stay as they were.

Put another way, we scan all posibilities then decide. We don't stop the=20
moment somethign returns any sort of positive match.

Take care,

Bill

--jRHKVT23PllUwdXP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFGLP3BWz+3JHUci9cRAjCzAKCNIrrA28R7nVJ9bmUwdMqI+71BCQCfbYNy
b4MniD+DB2ZahlLJspgPCOw=
=Lhp5
-----END PGP SIGNATURE-----

--jRHKVT23PllUwdXP--