From owner-cvs-src@FreeBSD.ORG Thu Dec 29 22:13:22 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBD8516A42A for ; Thu, 29 Dec 2005 22:13:22 +0000 (GMT) (envelope-from maksim.yevmenkin@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 190DC43D6A for ; Thu, 29 Dec 2005 22:13:08 +0000 (GMT) (envelope-from maksim.yevmenkin@gmail.com) Received: by nproxy.gmail.com with SMTP id d4so638237nfe for ; Thu, 29 Dec 2005 14:13:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Jq+gHRLLv2XmOSOgxEtkGrIvgJ2ET5Bx2hvnx0QXTV9X0a165XUCBPFidvZ4RtQcKXk+DC+vZB9D992mrPzKUImFY3JazZx2ZGFL32DJzS0Aeb5LAMfGURwx2lN7ObnfE/+wlUDny6imThQSGrsn9kbM6jmEMqxS1ig3q/a/WAc= Received: by 10.48.4.9 with SMTP id 9mr399777nfd; Thu, 29 Dec 2005 14:13:04 -0800 (PST) Received: by 10.48.127.10 with HTTP; Thu, 29 Dec 2005 14:13:04 -0800 (PST) Message-ID: Date: Thu, 29 Dec 2005 14:13:04 -0800 From: Maksim Yevmenkin To: Maxim.Sobolev@portaone.com In-Reply-To: <43B45653.5050606@portaone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200512292011.jBTKBkVa073791@repoman.freebsd.org> <43B45653.5050606@portaone.com> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/usr.sbin/kbdcontrol kbdcontrol.1 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 22:13:23 -0000 [...] > > thanks for doing this! unfortunately, the sequence of command you have > > put into the man page not entirely correct. > > > > it will work, if you do all the commands from the scripts and do it > > fast enough. note that syscons(4) will try to grab the first available > > keyboard when it does not have one, and, the first thing you do is to > > release current keyboard. > > Actually I think you not quite correct - such syscons(4) behaviour is > optional (opt in) and depends on 0x100 flags to sc(4). yes, it depends on the flag you have mentioned and the flag is set by default :) from GENERIC.hints hint.sc.0.at=3D"isa" hint.sc.0.flags=3D"0x100" > At least that sequence works here with GENERIC kernel/hints just fine. i never said it would not :) i just only pointed out that you have to put this commands in the script. otherwise how are you going to type after you have released the keyboard with "kbdcontrol -K"? :) > In fact I believe the better way to handle this problem is to allow > kbdmux(4) to be reconfigured on the fly, that is when it's already > attached to the console. This way you will be able to attach it to the > console first and then add/remove actual keyboards as you see fit. I > don't think it will be very hard to do. > > What do you think? that is why syscons(4) has to support KBD{ADD,DEL}KB ioctl(2)s. you see, in order to issue ioctl(2) one must open /dev/kdbmux0 device. the problem is that once keyboard was "kbd_allocate()"d, open(2) calls on /dev/Xkbd will fail. so you see, once you switched keyboard to kbdmux(4) you can not open /dev/kbdmux anymore. the only way to reconfigure kdbmux(4) is to pass ioctl(2)s via syscons(4). just like any other keyboard ioctl(2). so the sequence i sent allows you to reconfigure kbdmux(4) on-the-fly. however, all of this is really a band-aid to allow people to at least try kbdbux(4). i have patches to syscons(4) and kbd code that will make kbdmux(4) to automatically take over any keyboard attached to the system. everything done in kernel. i did not commit these because kbdmux(4) has issues that i still need to figure out and fix. thanks, max