aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hyperv
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2023-02-14 13:03:28 +0000
committerStefan Eßer <se@FreeBSD.org>2023-02-14 13:03:28 +0000
commitf20058955c9d1041a5a09cd02a27babda7e34dc8 (patch)
treef5baabe301fedcfe2fae96c535440d12ab70392f /sys/dev/hyperv
parentc2bb66023fe3e3617f56302b6960f59545a5535c (diff)
downloadsrc-f20058955c9d1041a5a09cd02a27babda7e34dc8.tar.gz
src-f20058955c9d1041a5a09cd02a27babda7e34dc8.zip
sys/kbio.h: make pre-unicode keymap support optional
FreeBSD-9 had introduced support for the full set of Unicode characters to the parsing and processing of keymap character tables. This support has been extended to cover the table for accented characters that are reached via dead key combinations in FreeBSD-13.2. New ioctls have been introduced to support both the pre-Unicode and the Unicode formats and keyboard drivers have been extended to support those ioctls. This commit makes the ABI compatibility functions in the kernel optional and dependent on COMPAT_FREEBSD13 in -CURRENT. The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has been made ABI compatible with old kernels to allow a new world to be run on an old kernel (that does not have full Unicode support for keymaps). This commit is not to merged back to 12-STABLE or 13-STABLE. It is part of review D38465, which has been split into 3 separate commits due to different MFC and life-time requirements of either commit. Approved by: imp Differential Revision: https://reviews.freebsd.org/D38465
Diffstat (limited to 'sys/dev/hyperv')
-rw-r--r--sys/dev/hyperv/input/hv_kbd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/hyperv/input/hv_kbd.c b/sys/dev/hyperv/input/hv_kbd.c
index 2e313b06ca7e..721178a9f3f2 100644
--- a/sys/dev/hyperv/input/hv_kbd.c
+++ b/sys/dev/hyperv/input/hv_kbd.c
@@ -663,10 +663,12 @@ hvkbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg)
KBD_LED_VAL(kbd) = *(int *)arg;
break;
case PIO_KEYMAP: /* set keyboard translation table */
- case OPIO_KEYMAP: /* set keyboard translation table (compat) */
case PIO_KEYMAPENT: /* set keyboard translation table entry */
case PIO_DEADKEYMAP: /* set accent key translation table */
+#ifdef COMPAT_FREEBSD13
+ case OPIO_KEYMAP: /* set keyboard translation table (compat) */
case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */
+#endif /* COMPAT_FREEBSD13 */
sc->sc_accents = 0;
/* FALLTHROUGH */
default: