Date: Sat, 22 Nov 2014 17:10:57 +0000 (UTC) From: Jean-Sebastien Pedron <dumbbell@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274861 - stable/10/sys/dev/vt Message-ID: <201411221710.sAMHAvD0079933@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dumbbell Date: Sat Nov 22 17:10:57 2014 New Revision: 274861 URL: https://svnweb.freebsd.org/changeset/base/274861 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 of: r273973 Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Sat Nov 22 16:55:55 2014 (r274860) +++ stable/10/sys/dev/vt/vt_core.c Sat Nov 22 17:10:57 2014 (r274861) @@ -865,7 +865,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); @@ -893,6 +892,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411221710.sAMHAvD0079933>