[PATCH] xfree86: if AllowEmptyInput is true, enable RAW mode on the console.

Adam Jackson ajax at nwnk.net
Thu Oct 16 10:22:29 PDT 2008


On Wed, 2008-10-15 at 12:55 +1030, Peter Hutterer wrote:
 
> +	    /* Set the keyboard to RAW mode. If we're using the keyboard
> +	     * driver, the driver does it for us. If we have AEI on, then
> +	     * we're expecting the devices to be added (i.e. evdev) and we
> +	     * have to set it manually.
> +	     */
> +	    if (xf86Info.allowEmptyInput)
> +	    {
> +		struct termios nTty;
> +
> +		if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0)
> +		    FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
> +			    strerror(errno));
> +
> +		ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode);
> +		tcgetattr(xf86Info.consoleFd, &tty_attr);

Just in case anyone else spots this, the getmode and getattr properly
come before the setmode.  Fortunately Peter and I caught this before he
committed to master, so the patch there is correct.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20081016/55189a43/attachment.pgp>


More information about the xorg mailing list