From owner-cvs-all@FreeBSD.ORG Wed Sep 20 16:22:42 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24CC716A4E0; Wed, 20 Sep 2006 16:22:42 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id C956343D8F; Wed, 20 Sep 2006 16:21:04 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id A301F5CC8; Wed, 20 Sep 2006 20:21:03 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 803895C38; Wed, 20 Sep 2006 20:21:03 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k8KGL5L2027751; Wed, 20 Sep 2006 20:21:05 +0400 (MSD) (envelope-from ru) Date: Wed, 20 Sep 2006 20:21:05 +0400 From: Ruslan Ermilov To: Marius Strobl Message-ID: <20060920162105.GC9976@rambler-co.ru> References: <20060919194819.GA23360@rambler-co.ru> <20060919203608.GE23360@rambler-co.ru> <20060919215605.GB44298@rambler-co.ru> <20060919221404.GT94944@alchemy.franken.de> <20060920055715.GA81843@rambler-co.ru> <20060920121017.GU94944@alchemy.franken.de> <20060920122830.GB982@rambler-co.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eheScQNz3K90DVRs" Content-Disposition: inline In-Reply-To: <20060920122830.GB982@rambler-co.ru> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Maksim Yevmenkin Subject: Re: cvs commit: src/sys/dev/kbdmux kbdmux.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2006 16:22:42 -0000 --eheScQNz3K90DVRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here's another demo that indicates that sparc64 doesn't work properly. In this case it's a CONS_SETKBD ioctl which is used by kbdcontrol(8). I "kldload vkbd" and make sure two vkbd instances exist, /dev/vkbdctl0 and /dev/vkbdctl1. Now, I open the first like this: sleep 1200 < /dev/vkbdctl0 and attempt to program /dev/vkbdctl1 as a keyboard for virtual terminals. On amd64, I get: # kbdcontrol -K < /dev/ttyv0 > /dev/null ; kbdcontrol -k /dev/vkbdctl1 -i <= /dev/ttyv0 kbd2 at vkbd1 kbd2 vkbd1, type:generic (0) kbd2: vkbd1, type:generic (0) It's fine; the "-i" returns the same console as as was programmed. On sparc64, I get: # kbdcontrol -K < /dev/ttyv0 > /dev/null ; kbdcontrol -k /dev/vkbdctl1 -i <= /dev/ttyv0 kbd1 vkbd1, type:generic (0) kbd0: vkbd0, type:generic (0) Surprise! It assigned already open (by sleep(1)) vkbd0 while I asked for vkbd1. Oh yes, if you ever want to repeat this, make sure to temporary apply this patch to kbdcontrol.c, because vkbd is only valid when it's open: %%% Index: kbdcontrol.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/usr.sbin/kbdcontrol/kbdcontrol.c,v retrieving revision 1.50 diff -u -p -r1.50 kbdcontrol.c --- kbdcontrol.c 15 Sep 2006 18:41:12 -0000 1.50 +++ kbdcontrol.c 20 Sep 2006 16:18:48 -0000 @@ -1046,7 +1046,9 @@ set_keyboard(char *device) * is closed. So, we don't check error here. */ ioctl(fd, CONS_RELKBD, 0); +#if 0 close(fd); +#endif #if 1 printf("kbd%d\n", info.kb_index); printf(" %.*s%d, type:%s (%d)\n", %%% What this means practically is that currently, on sparc64, you can only have a /dev/kbd0 keyboard attached to a syscons console. A fix is in the works... Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --eheScQNz3K90DVRs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFEWpxqRfpzJluFF4RAmiVAJ0dTiCWY5eZvHSG7ehJfH+7q+HekwCfRlxi szEfOOHyRPu93xVMB029PX0= =ADQb -----END PGP SIGNATURE----- --eheScQNz3K90DVRs--