svn commit: r281947 - stable/9/sys/dev/vt
Ed Maste
emaste at FreeBSD.org
Fri Apr 24 19:26:01 UTC 2015
Author: emaste
Date: Fri Apr 24 19:26:01 2015
New Revision: 281947
URL: https://svnweb.freebsd.org/changeset/base/281947
Log:
MFC r273973: 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: 196512
Modified:
stable/9/sys/dev/vt/vt_core.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/vt/vt_core.c
==============================================================================
--- stable/9/sys/dev/vt/vt_core.c Fri Apr 24 19:15:38 2015 (r281946)
+++ stable/9/sys/dev/vt/vt_core.c Fri Apr 24 19:26:01 2015 (r281947)
@@ -559,7 +559,6 @@ vt_allocate_keyboard(struct vt_device *v
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 @@ vt_allocate_keyboard(struct vt_device *v
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);
More information about the svn-src-stable-9
mailing list