svn commit: r273973 - head/sys/dev/vt

Jean-Sebastien Pedron dumbbell at FreeBSD.org
Sun Nov 2 16:04:49 UTC 2014


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

Modified:
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c	Sun Nov  2 14:28:20 2014	(r273972)
+++ head/sys/dev/vt/vt_core.c	Sun Nov  2 16:04:48 2014	(r273973)
@@ -866,7 +866,6 @@ vt_allocate_keyboard(struct vt_device *v
 	keyboard_info_t	 ki;
 
 	idx0 = kbd_allocate("kbdmux", -1, vd, vt_kbdevent, vd);
-	vd->vd_keyboard = idx0;
 	if (idx0 >= 0) {
 		DPRINTF(20, "%s: kbdmux allocated, idx = %d\n", __func__, idx0);
 		k0 = kbd_get_keyboard(idx0);
@@ -894,6 +893,7 @@ vt_allocate_keyboard(struct vt_device *v
 			return (-1);
 		}
 	}
+	vd->vd_keyboard = idx0;
 	DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard);
 
 	return (idx0);


More information about the svn-src-head mailing list