Date: Fri, 24 Apr 2015 19:26:01 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281947 - stable/9/sys/dev/vt Message-ID: <201504241926.t3OJQ1hv068026@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504241926.t3OJQ1hv068026>