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: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/55103: /dev/wsmouse returns EINVAL
Date: Wed, 1 Apr 2020 14:12:31 -0700 (PDT)
> Reading from /dev/wsmouse was possible to get mouse events from any program.
> You would get legacy events with 32bit time_t unless the program negotiates
> the current protocol version.
>
> This now fails and a read returns EINVAL.
>
> Reason is that the legacy handling code was moved into the COMPAT_50 module,
> if the module cannot be loaded, you get ENOSYS which is then translated
> into EINVAL by the wsmouse driver.
>
>> How-To-Repeat:
> hexdump -C /dev/wsmouse
>
>> Fix:
> Either move the code out of COMPAT_50 or use the current protocol
> version as the default.
Hmmm, I'm not sure I fully understand this.
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).
The compatability code relies on 32-bit time-spec code which is also
conditional on COMPAT_50. So I can't see how any of this would do
anything useful unless the compat_50 module was present (either built-
in or modload(8)ed).
I'm also unfamiliar with the "protocol version" so not at all aware
of what would need to be changed to make it the default.
The current code should work just fine if either the compat_50 module
is built-in or has been modload(8)ed.
+--------------------+--------------------------+-----------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost |
+--------------------+--------------------------+-----------------------+
Home |
Main Index |
Thread Index |
Old Index