From owner-cvs-all@FreeBSD.ORG Wed Sep 20 05:57:16 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 A88B316A40F; Wed, 20 Sep 2006 05:57:16 +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 1962343D4C; Wed, 20 Sep 2006 05:57:15 +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 0F6E05C53; Wed, 20 Sep 2006 09:57:14 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id C8D305C4D; Wed, 20 Sep 2006 09:57:13 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k8K5vFQ3081970; Wed, 20 Sep 2006 09:57:15 +0400 (MSD) (envelope-from ru) Date: Wed, 20 Sep 2006 09:57:15 +0400 From: Ruslan Ermilov To: Marius Strobl Message-ID: <20060920055715.GA81843@rambler-co.ru> References: <200609191303.k8JD3AHl050783@repoman.freebsd.org> <20060919190645.GA23068@rambler-co.ru> <20060919194819.GA23360@rambler-co.ru> <20060919203608.GE23360@rambler-co.ru> <20060919215605.GB44298@rambler-co.ru> <20060919221404.GT94944@alchemy.franken.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: <20060919221404.GT94944@alchemy.franken.de> 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 05:57:16 -0000 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > >=20 > > 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. >=20 > 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=3D1.8&view=3Dmarkup >=20 Hmm, but they don't work on sparc64. How X.Org ever works then? I remember installing it on my sparc64 laptop... : # uname -p : sparc64 : # cat a.c : #include : #include : #include : #include : #include :=20 : int : main(void) : { : int mode; :=20 : mode =3D K_CODE; : if (ioctl(0, KDSKBMODE, mode) =3D=3D -1) : err(1, "ioctl(KDSKBMODE)"); :=20 : if (ioctl(0, KDGKBMODE, &mode) =3D=3D -1) : err(1, "ioctl(KDGKBMODE)"); : printf("current mode =3D %d, should be %d\n", mode, K_CODE); :=20 : exit (0); : } : # ./a < /dev/vkbdctl0 : current mode =3D 0, should be 2 : #=20 Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFENg6qRfpzJluFF4RAifJAKCAbHS+S90lv2uNuQtTGnLrHx2SggCfWuow thiqXpTnObCPAO+PAh5ncVE= =ntqJ -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--