Re: cvs commit: src/sys/dev/kbdmux kbdmux.c

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Wed, 20 Sep 2006 16:28:30 +0400
On Wed, Sep 20, 2006 at 02:10:17PM +0200, Marius Strobl wrote:
> On Wed, Sep 20, 2006 at 09:57:15AM +0400, Ruslan Ermilov wrote:
> > On Wed, Sep 20, 2006 at 12:14:04AM +0200, Marius Strobl wrote:
> > > On Wed, Sep 20, 2006 at 01:56:05AM +0400, Ruslan Ermilov wrote:
> > > > 
> > > > The proper fix would be to fix the kernel to pass an argument by
> > > > value, like the userland does.  But from the practical point of
> > > > view, it may make sense to change the API and say that these
> > > > IOCTLs now take a pointer type argument.  I'm not sure.  If you
> > > > know of any applications (mine test util not counting :-) that
> > > > use KDSKBMODE/KDSETLED/KDSKBSTATE, then we should probably fix
> > > > the kernel callers.
> > > 
> > > XFree86/Xorg use KDSKBMODE and KDSETLED, see f.e. the Xorg
> > > "kbd" driver:
> > > http://webcvs.freedesktop.org/xorg/xserver/xorg/hw/xfree86/os-support/bsd/bsd_kbd.c?revision=1.8&view=markup
> > > 
> > Hmm, but they don't work on sparc64.  How X.Org ever works then?
> > I remember installing it on my sparc64 laptop...
> 
> KDSETLED just never worked on sparc64 so far (from userland...),
> keyboard LEDs just don't get lit when in X. As for KDSKBMODE
> K_RAW is defined as 0 so X happens to put the keyboard into
> raw mode as expected and syscons(4) makes sure that the
> keyboard is in translate mode in sccngetch(). So apart from
> the keyboard LEDs keyboards just happen to work in X and
> when back on the console on sparc64.
> 
OK, good to know, thanks!  I have a real fix in the works, just
scanning the entire tree for other IOCTLs like this.  With this
fix, the LEDs should start working without recompiling the X.


Cheers,
-- 
Ruslan Ermilov
ru_at_FreeBSD.org
FreeBSD committer

Received on Wed Sep 20 2006 - 12:28:32 UTC