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

Ruslan Ermilov ru at FreeBSD.org
Tue Sep 19 13:46:57 PDT 2006


On Wed, Sep 20, 2006 at 12:36:08AM +0400, Ruslan Ermilov wrote:
> KDSETLED isn't used outside the kernel, so I assume you tested it
> only when it's called from within the kernel?  If so, try passing
> it from useland to see the endianness problem; I'm pretty sure it
> will fire. [...]
> 
Can you please compile and run the following utility on sparc64,
on any non-busy /dev/kbd*?

: #include <sys/kbio.h>
: #include <sys/ioctl.h>
: #include <err.h>
: #include <stdio.h>
: #include <stdlib.h>
: 
: int
: main(void)
: {
:         int mode;
: 
:         if (ioctl(0, KDGKBMODE, &mode) == -1)
:                 err(1, "ioctl(KDGKBMODE)");
:         printf("current mode = %d\n", mode);
: 
:         if (ioctl(0, KDSKBMODE, mode) == -1)
:                 err(1, "ioctl(KDSKBMODE)");
: 
:         if (ioctl(0, KDGKBMODE, &mode) == -1)
:                 err(1, "ioctl(KDGKBMODE)");
:         printf("current mode = %d\n", mode);
: 
:         exit (0);
: }

On my i386 notebook after "kldload kbdmux" and the
following config as a result:

lrwxr-xr-x  1 root  wheel  6 Jan  1  1970 /dev/kbd0 -> atkbd0
lrwxr-xr-x  1 root  wheel  7 Sep 20 00:43 /dev/kbd1 -> kbdmux0

: ./a < /dev/kbd1
: current mode = 1
: current mode = 1

If it works properly on sparc64, it should be identical.
If you'll see a different value in the second "current
mode", it'll indicate an endianness bug we're talking
about.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20060919/a486cefe/attachment-0001.pgp


More information about the cvs-src mailing list