cvs commit: src/sys/dev/kbdmux kbdmux.c
Ruslan Ermilov
ru at FreeBSD.org
Tue Sep 19 14:25:14 PDT 2006
On Wed, Sep 20, 2006 at 12:46:55AM +0400, Ruslan Ermilov wrote:
> 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.
>
It doesn't, on sparc64, work properly:
# uname -p
sparc64
# ./a < /dev/vkbdctl0
current mode = 1
current mode = 0
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/7ceacb05/attachment.pgp
More information about the cvs-src
mailing list