Subject: Re: prototype in GENERIC for APC UPS?
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Dieter Baron <dillo@danbala.tuwien.ac.at>
List: tech-kern
Date: 04/23/2007 20:43:39
In article <20070423145746.9E54D76666D@berkshire.machshav.com> Steven wrote:
: On Mon, 23 Apr 2007 16:50:29 +0200
: Martin Husemann <martin@duskware.de> wrote:
: > On Mon, Apr 23, 2007 at 10:43:12AM -0400, Steven M. Bellovin wrote:
: > > I wonder if we should include a commented-out line like this in the
: > > GENERIC config file:
: > >
: > > # Detect APC UPS as ugen instead of uhid
: > > #ugen* at uhub? port ? vendor "0x051d" flags 1
: > >
: > > and perhaps others if appropriate.
: >
: > 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?
: >
: 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?
IIUC, no. The match with the highest priority is taken, so if ugen
returns a higher priority for the listed devices than uhid (et. al.),
we're good. The order the matching routines are called in doesn't
matter.
yours,
dillo