Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Dec 2014 18:00:49 +0100
From:      Andre Albsmeier <mail@ma20.ata.myota.org>
To:        Jean-Sebastien Pedron <dumbbell@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r273973 - head/sys/dev/vt
Message-ID:  <20141204170049.GA1832@schlappy>
In-Reply-To: <201411021604.sA2G4n1R088429@svn.freebsd.org>
References:  <201411021604.sA2G4n1R088429@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 02-Nov-2014 at 16:04:49 +0000, Jean-Sebastien Pedron wrote:
> Author: dumbbell
> Date: Sun Nov  2 16:04:48 2014
> New Revision: 273973
> URL: https://svnweb.freebsd.org/changeset/base/273973
> 
> Log:
>   vt(4): Fix keyboard allocation when kbdmux(4) isn't used
>   
>   The problem was that only the kbdmux keyboard index was saved in
>   vd->vd_keyboard. This index is -1 when kbdmux isn't used. In this
>   case, the keyboard was correctly allocated, but the returned index was
>   discarded.
>   
>   PR:		194718
>   MFC after:	1 week

Could someone please MFC this to 9? The patch is slightly
different here but works:

--- sys/dev/vt/vt_core.c.ORI	2014-07-22 17:29:27.000000000 +0200
+++ sys/dev/vt/vt_core.c	2014-12-04 17:04:12.000000000 +0100
@@ -559,7 +559,6 @@
 	idx0 = kbd_allocate("kbdmux", -1, (void *)&vd->vd_keyboard,
 	    vt_kbdevent, vd);
 	/* XXX: kb_token lost */
-	vd->vd_keyboard = idx0;
 	if (idx0 != -1) {
 		DPRINTF(20, "%s: kbdmux allocated, idx = %d\n", __func__, idx0);
 		k0 = kbd_get_keyboard(idx0);
@@ -583,6 +582,7 @@
 		idx0 = kbd_allocate("*", -1, (void *)&vd->vd_keyboard,
 		    vt_kbdevent, vd);
 	}
+	vd->vd_keyboard = idx0;
 	DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard);
 
 	return (idx0);


Thanks,

	-Andre



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141204170049.GA1832>