summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2014-11-22 17:10:57 +0000
committerdumbbell <dumbbell@FreeBSD.org>2014-11-22 17:10:57 +0000
commit53ec9d6c8c3b64a3691010dd696f1dc86ace4ef0 (patch)
treeedb4bb9c6f204288f765f0fdc1c4edffa5a34015 /sys
parent67ea82037affc090649d9f584fbdcce9a58ba367 (diff)
downloadFreeBSD-src-53ec9d6c8c3b64a3691010dd696f1dc86ace4ef0.zip
FreeBSD-src-53ec9d6c8c3b64a3691010dd696f1dc86ace4ef0.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/vt/vt_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index 6dbb68d..f7e3244 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -865,7 +865,6 @@ vt_allocate_keyboard(struct vt_device *vd)
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 *vd)
return (-1);
}
}
+ vd->vd_keyboard = idx0;
DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard);
return (idx0);
OpenPOWER on IntegriCloud