Subject: Re: prototype in GENERIC for APC UPS?
To: Joerg Sonnenberger <joerg@britannica.bec.de>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-kern
Date: 04/23/2007 12:24:17
On Mon, 23 Apr 2007 17:24:56 +0200
Joerg Sonnenberger <joerg@britannica.bec.de> wrote:

> On Mon, Apr 23, 2007 at 04:09:56PM +0100, Matthias Scheler wrote:
> > Well, you could always teach uhid(4) to ignore certain devices in
> > which ugen(4) should get them.
> 
> I think it would be better to fix apcusbd to work with uhid instead. I
> think that it doesn't work is mostly a linuxism.
> 
In principle, that might work, though in practice we've had trouble
getting some application developers to pay attention to portability.

Here's an excerpt from actual email from a developer, when we
mentioned that the code didn't run on NetBSD because NetBSD obeyed a
"must not" clause in Posix:

   The XXXX maintainer basically said that Posix/Opengroup/whoever are
   silly for suggesting a failure for values greater than one million
   passed to usleep and that NetBSD is silly for having dumb restrictions
   that should have been disallowed in the standards.  We also had such
   quotes as
   
           Obviously the XXXX program is not a strictly-conforming
           POSIX application, but that's OK. Most useful apps are not.
   
   and
   
           You are free to improve the quality of your libc by removing 4
           or 5 lines of harmful code.
   
   Also, nanosleep is a pain to use and adds 5 lines of code to do what
   usleep can do with one line of code.

Mind you, I'm not saying that the apcupsd maintainers feel that way,
just that it's been a problem in the past.

Speaking more generally, I think there have been other ugen vs. specialized
USB device issues in the past.


		--Steve Bellovin, http://www.cs.columbia.edu/~smb