Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106938135
D38465.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D38465.diff
View Options
diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c
--- a/sys/dev/adb/adb_kbd.c
+++ b/sys/dev/adb/adb_kbd.c
@@ -795,10 +795,12 @@
break;
case PIO_KEYMAP:
- case OPIO_KEYMAP:
case PIO_KEYMAPENT:
case PIO_DEADKEYMAP:
+#ifdef COMPAT_FREEBSD13
+ case OPIO_KEYMAP:
case OPIO_DEADKEYMAP:
+#endif /* COMPAT_FREEBSD13 */
default:
return (genkbd_commonioctl(kbd, cmd, data));
}
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -1088,10 +1088,12 @@
return error;
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 */
state->ks_accents = 0;
/* FALLTHROUGH */
default:
diff --git a/sys/dev/gpio/gpiokeys.c b/sys/dev/gpio/gpiokeys.c
--- a/sys/dev/gpio/gpiokeys.c
+++ b/sys/dev/gpio/gpiokeys.c
@@ -894,12 +894,15 @@
return (gpiokeys_set_typematic(kbd, *(int *)arg));
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 */
- case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */
+#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:
diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c
--- a/sys/dev/hid/hkbd.c
+++ b/sys/dev/hid/hkbd.c
@@ -1635,12 +1635,15 @@
return (hkbd_set_typematic(kbd, *(int *)arg));
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 */
- case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */
+#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:
diff --git a/sys/dev/hyperv/input/hv_kbd.c b/sys/dev/hyperv/input/hv_kbd.c
--- a/sys/dev/hyperv/input/hv_kbd.c
+++ b/sys/dev/hyperv/input/hv_kbd.c
@@ -663,10 +663,12 @@
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:
diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c
--- a/sys/dev/kbd/kbd.c
+++ b/sys/dev/kbd/kbd.c
@@ -789,13 +789,16 @@
genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
{
keymap_t *mapp;
- okeymap_t *omapp;
accentmap_t *accentmapp;
- oaccentmap_t *oaccentmapp;
keyarg_t *keyp;
fkeyarg_t *fkeyp;
- int i, j;
int error;
+ int i;
+#ifdef COMPAT_FREEBSD13
+ int j;
+ okeymap_t *omapp;
+ oaccentmap_t *oaccentmapp;
+#endif /* COMPAT_FREEBSD13 */
GIANT_REQUIRED;
switch (cmd) {
@@ -824,6 +827,7 @@
error = copyout(kbd->kb_keymap, *(void **)arg,
sizeof(keymap_t));
return (error);
+#ifdef COMPAT_FREEBSD13
case OGIO_KEYMAP: /* get keyboard translation table (compat) */
mapp = kbd->kb_keymap;
omapp = (okeymap_t *)arg;
@@ -836,10 +840,14 @@
omapp->key[i].flgs = mapp->key[i].flgs;
}
break;
+#endif /* COMPAT_FREEBSD13 */
case PIO_KEYMAP: /* set keyboard translation table */
+#ifdef COMPAT_FREEBSD13
case OPIO_KEYMAP: /* set keyboard translation table (compat) */
+#endif /* COMPAT_FREEBSD13 */
#ifndef KBD_DISABLE_KEYMAP_LOAD
mapp = malloc(sizeof *mapp, M_TEMP, M_WAITOK);
+#ifdef COMPAT_FREEBSD13
if (cmd == OPIO_KEYMAP) {
omapp = (okeymap_t *)arg;
mapp->n_keys = omapp->n_keys;
@@ -850,7 +858,9 @@
mapp->key[i].spcl = omapp->key[i].spcl;
mapp->key[i].flgs = omapp->key[i].flgs;
}
- } else {
+ } else
+#endif /* COMPAT_FREEBSD13 */
+ {
error = copyin(*(void **)arg, mapp, sizeof *mapp);
if (error != 0) {
free(mapp, M_TEMP);
@@ -904,6 +914,7 @@
sizeof(accentmap_t));
return (error);
break;
+#ifdef COMPAT_FREEBSD13
case OGIO_DEADKEYMAP: /* get accent key translation table (compat) */
accentmapp = kbd->kb_accentmap;
oaccentmapp = (oaccentmap_t *)arg;
@@ -919,11 +930,15 @@
}
}
break;
+#endif /* COMPAT_FREEBSD13 */
case PIO_DEADKEYMAP: /* set accent key translation table */
+#ifdef COMPAT_FREEBSD13
case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */
+#endif /* COMPAT_FREEBSD13 */
#ifndef KBD_DISABLE_KEYMAP_LOAD
accentmapp = malloc(sizeof(*accentmapp), M_TEMP, M_WAITOK);
+#ifdef COMPAT_FREEBSD13
if (cmd == OPIO_DEADKEYMAP) {
oaccentmapp = (oaccentmap_t *)arg;
accentmapp->n_accs = oaccentmapp->n_accs;
@@ -937,7 +952,9 @@
oaccentmapp->acc[i].accchar;
}
}
- } else {
+ } else
+#endif /* COMPAT_FREEBSD13 */
+ {
error = copyin(*(void **)arg, accentmapp, sizeof(*accentmapp));
if (error != 0) {
free(accentmapp, M_TEMP);
diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c
--- a/sys/dev/kbdmux/kbdmux.c
+++ b/sys/dev/kbdmux/kbdmux.c
@@ -1240,12 +1240,14 @@
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) */
KBDMUX_LOCK(state);
- state->ks_accents = 0;
+ state->ks_accents = 0;
+#endif /* COMPAT_FREEBSD13 */
/* perform command on all slave keyboards */
SLIST_FOREACH(k, &state->ks_kbds, next)
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -1594,12 +1594,14 @@
case GIO_KEYMAP: /* get keyboard translation table */
case PIO_KEYMAP: /* set keyboard translation table */
- case OGIO_KEYMAP: /* get keyboard translation table (compat) */
- case OPIO_KEYMAP: /* set keyboard translation table (compat) */
case GIO_DEADKEYMAP: /* get accent key translation table */
case PIO_DEADKEYMAP: /* set accent key translation table */
+#ifdef COMPAT_FREEBSD13
+ case OGIO_KEYMAP: /* get keyboard translation table (compat) */
+ case OPIO_KEYMAP: /* set keyboard translation table (compat) */
case OGIO_DEADKEYMAP: /* get accent key translation table (compat) */
case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */
+#endif /* COMPAT_FREEBSD13 */
case GETFKEY: /* get function key string */
case SETFKEY: /* set function key string */
error = kbdd_ioctl(sc->kbd, cmd, data);
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -1857,12 +1857,15 @@
return (ukbd_set_typematic(kbd, *(int *)arg));
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 */
- case OPIO_DEADKEYMAP: /* set accent key translation table (compat) */
+#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:
diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c
--- a/sys/dev/vkbd/vkbd.c
+++ b/sys/dev/vkbd/vkbd.c
@@ -1204,10 +1204,12 @@
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 */
state->ks_accents = 0;
/* FALLTHROUGH */
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -2403,9 +2403,11 @@
case GIO_KEYMAP:
case PIO_KEYMAP:
case GIO_DEADKEYMAP:
- case OGIO_DEADKEYMAP:
case PIO_DEADKEYMAP:
+#ifdef COMPAT_FREEBSD13
+ case OGIO_DEADKEYMAP:
case OPIO_DEADKEYMAP:
+#endif /* COMPAT_FREEBSD13 */
case GETFKEY:
case SETFKEY:
case KDGKBINFO:
diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h
--- a/sys/sys/kbio.h
+++ b/sys/sys/kbio.h
@@ -120,7 +120,7 @@
};
typedef struct keymap keymap_t;
-#ifdef _KERNEL
+#ifdef COMPAT_FREEBSD13
struct okeyent_t {
u_char map[NUM_STATES];
u_char spcl;
@@ -132,7 +132,7 @@
struct okeyent_t key[NUM_KEYS];
};
typedef struct okeymap okeymap_t;
-#endif /* _KERNEL */
+#endif /* COMPAT_FREEBSD13 */
#endif /* !_KEYMAP_DECLARED */
@@ -209,7 +209,7 @@
};
typedef struct accentmap accentmap_t;
-//#ifdef _KERNEL
+#ifdef COMPAT_FREEBSD13
struct oacc_t {
u_char accchar;
u_char map[NUM_ACCENTCHARS][2];
@@ -220,7 +220,7 @@
struct oacc_t acc[NUM_DEADKEYS];
};
typedef struct oaccentmap oaccentmap_t;
-//#endif /* _KERNEL */
+#endif /* COMPAT_FREEBSD13 */
struct keyarg {
u_short keynum;
@@ -250,17 +250,17 @@
/* XXX: Should have keymap_t as an argument, but that's too big for ioctl()! */
#define GIO_KEYMAP _IO('k', 6)
#define PIO_KEYMAP _IO('k', 7)
-#ifdef _KERNEL
+#ifdef COMPAT_FREEBSD13
#define OGIO_KEYMAP _IOR('k', 6, okeymap_t)
#define OPIO_KEYMAP _IOW('k', 7, okeymap_t)
-#endif /* _KERNEL */
+#endif /* COMPAT_FREEBSD13 */
/* XXX: Should have accentmap_t as an argument, but that's too big for ioctl()! */
#define GIO_DEADKEYMAP _IO('k', 8)
#define PIO_DEADKEYMAP _IO('k', 9)
-//#ifdef _KERNEL
+#ifdef COMPAT_FREEBSD13
#define OGIO_DEADKEYMAP _IOR('k', 8, oaccentmap_t)
#define OPIO_DEADKEYMAP _IOW('k', 9, oaccentmap_t)
-//#endif /* _KERNEL */
+#endif /* COMPAT_FREEBSD13 */
#define GIO_KEYMAPENT _IOWR('k', 10, keyarg_t)
#define PIO_KEYMAPENT _IOW('k', 11, keyarg_t)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 6:30 PM (2 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15725161
Default Alt Text
D38465.diff (10 KB)
Attached To
Mode
D38465: Make pre-Unicode keymap support depend on COMPAT_FREEBSD13
Attached
Detach File
Event Timeline
Log In to Comment