NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/55103: /dev/wsmouse returns EINVAL

The following reply was made to PR kern/55103; it has been noted by GNATS.

From: Michael van Elst <>
Subject: Re: kern/55103: /dev/wsmouse returns EINVAL
Date: Thu, 2 Apr 2020 01:23:41 +0200

 On Wed, Apr 01, 2020 at 09:15:02PM +0000, Paul Goyette wrote:
 >  > Reading from /dev/wsmouse was possible to get mouse events from any program.
 >  The original code (before merging the [pgoyette-compat] branch) was
 >  conditional on
 >   	#if defined(COMPAT_50) || defined(MODULAR)
 >  (and directly returned EINVAL if those options were not present).
 Before COMPAT_50:  reading mouse was possible, no EINVAL failure existed.
 After COMPAT_50: reading mouse was possible because COMPAT_50 was default.
 Now: reading mouse is no longer possible because COMPAT_50 is removed and
 module isn't autoloaded.
 What would you suggest to make "reading mouse is possible" true again?
 - Move compat code back into main code, no option, no optional module.
 - Weaken compatibility and make events with 64bit time_t the default
 unless the module is loaded.
 There is a single user of that interface and the difference between
 "doen't work because no compat code installed" (status quo) and
 "doesn't work because interface isn't compatible" (second choice)
 is small. In either case you only get compatibility (with ancient
 userland!) by loading the module.
 The first choice is also a possibility. Just implementing the old protocol
 version probably needs less code than the module and compat glue.
                                 Michael van Elst
                                 "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index